{"url": "https://developers.openai.com/", "titulek": "OpenAI Developers", "h1": "OpenAI for developers", "popis": "Docs and resources to help you build with, for, and on OpenAI.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/", "og:site_name": "OpenAI Developers", "og:title": "OpenAI Developers", "og:description": "Docs and resources to help you build with, for, and on OpenAI.", "og:image": "https://developers.openai.com/open-graph.png", "og:image:alt": "OpenAI Developers"}, "jsonld": [{"@context": "https://schema.org", "@type": "WebSite", "name": "OpenAI Developers", "url": "https://developers.openai.com/"}], "drobecky": [], "osnova": [{"uroven": 2, "text": "Introducing GPT-6 Astra"}, {"uroven": 3, "text": "API Platform"}, {"uroven": 3, "text": "Codex"}, {"uroven": 3, "text": "Plugins"}, {"uroven": 2, "text": "Codex use cases"}, {"uroven": 2, "text": "Showcase"}, {"uroven": 2, "text": "Featured"}, {"uroven": 2, "text": "GPT Image 2.5 for image generation and editing"}, {"uroven": 3, "text": "Codex for (almost) everything"}, {"uroven": 4, "text": "Realtime and audio"}, {"uroven": 4, "text": "Codex changelog"}, {"uroven": 4, "text": "Community page"}, {"uroven": 2, "text": "Blog posts"}, {"uroven": 3, "text": "Building games with Astra"}, {"uroven": 3, "text": "Architectural visualization with Astra"}, {"uroven": 3, "text": "Automating repetitive work at OpenAI with Codex"}], "markdown": "For the complete documentation index, see [llms.txt](/llms.txt) . Markdown versions of documentation pages are available by appending\n `.md` to the page URL.\n\n[API Dashboard](https://platform.openai.com/login)\n\n[Try ChatGPT](https://chatgpt.com/)\n\n## Introducing GPT-6 Astra\n\nOur most capable model, built for the hardest end-to-end work.\n\n[Start building with Astra](/api/docs/guides/latest-model) [View model details](/api/docs/models/gpt-6-astra)\n\n[API Platform Use our APIs and models to build your own AI experiences.](/api/docs) [Codex Build and ship faster with our coding agent — everywhere you work.](/codex) [Plugins Extend ChatGPT and Codex with skills, MCP servers, and optional UI.](/plugins)\n\n## Codex use cases\n\nLearn how teams are using Codex to automate tasks, build apps and ship with confidence.\n\n[Explore use cases (opens in a new tab)](https://learn.chatgpt.com/use-cases)\n\n## Showcase\n\nDiscover what builders are creating with Codex and the OpenAI API, and build your own version.\n\n[Explore demos](/showcase)\n\n## Featured\n\n## GPT Image 2.5 for image generation and editing\n\nMeet Sunburst and Flare. Choose Sunburst for precise editing, or Flare for fast, high-quality image generation.\n\n[Read the GPT Image 2.5 prompting guide](/api/docs/guides/image-prompting)\n\n### Codex for (almost) everything\n\nApril 16, 2026\n\n[Realtime and audio](/api/docs/guides/realtime) [Codex changelog](/codex/changelog) [Community page](/community)\n\n## Blog posts\n\n[View all](/blog)\n\n[Building games with Astra How I built a procedural space exploration game in Codex, from concept art to planets you can land on. Sep 4, 2026 Codex](/blog/how-to-build-games-with-astra) [Architectural visualization with Astra How I used Astra to design a house, refine its everyday details, and explore it through Blender camera tours and an Unreal Engine 5 walkthrough. Sep 4, 2026 Codex](/blog/architectural-visualization-with-astra) [Automating repetitive work at OpenAI with Codex How Runme and WebMCP turn recurring engineering tasks into reviewable, reusable workflows. Aug 25, 2026 Codex](/blog/automating-repetitive-work-at-openai-with-codex)\n\n[Help center Frequently asked account and billing questions](https://help.openai.com/en/) [Developer forum Discuss topics with other developers](https://community.openai.com/) [OpenAI Academy Courses and resources for learning about AI](https://openai.com/academy/) [Status Check the status of OpenAI services](https://status.openai.com/)\n\nLoading docs agent...", "znaku_textu": 2456, "slov": 319, "odkazu": 474, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:20", "sha256": "f5cf9f321e8c50f602d2c4c909123f08edbb508050e2b74d7c7353dc65338850", "hloubka": 0, "zdroj_objevu": "seed", "ze_seznamu": true, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://help.openai.com/en/", "https://status.openai.com/"]} {"url": "https://developers.openai.com/api/docs/", "titulek": "OpenAI API Platform Documentation", "h1": "API Platform", "popis": "Explore guides, API docs, and examples for the OpenAI API.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs", "og:site_name": "OpenAI Developers", "og:title": "OpenAI API Platform Documentation", "og:description": "Explore guides, API docs, and examples for the OpenAI API.", "og:image": "https://developers.openai.com/og/api/docs.png", "og:image:alt": "OpenAI API Platform Documentation", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 1, "text": "API Platform"}, {"uroven": 2, "text": "Developer quickstart"}, {"uroven": 2, "text": "Build paths"}, {"uroven": 3, "text": "Responses API"}, {"uroven": 3, "text": "Agents SDK"}, {"uroven": 2, "text": "Models"}, {"uroven": 2, "text": "Start building"}], "markdown": "API PlatformDeveloper quickstartMake your first API request in minutes. Learn the basics of the OpenAI platform.[Get started](/api/docs/quickstart)[Create API key](https://platform.openai.com/api-keys)`1 2 3 4 5 6 7curl https://api.openai.com/v1/responses \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -d '{ \"model\": \"gpt-6-astra\", \"input\": \"Write a short bedtime story about a unicorn.\" }'``1 2 3 4 5 6 7 8 9import OpenAI from \"openai\"; const client = new OpenAI(); const response = await client.responses.create({ model: \"gpt-6-astra\", input: \"Write a short bedtime story about a unicorn.\", }); console.log(response.output_text);``1 2 3 4 5 6 7from openai import OpenAI client = OpenAI() response = client.responses.create(model=\"gpt-6-astra\", input=\"Write a short bedtime story about a unicorn.\") print(response.output_text)``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25package main import ( \"context\" \"fmt\" \"github.com/openai/openai-go/v3\" \"github.com/openai/openai-go/v3/responses\" ) func main() { client := openai.NewClient() response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{ Model: \"gpt-6-astra\", Input: responses.ResponseNewParamsInputUnion{ OfString: openai.String(\"Write a short bedtime story about a unicorn.\"), }, }) if err != nil { panic(err) } fmt.Println(response.OutputText()) }``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20import com.openai.client.OpenAIClient; import com.openai.client.okhttp.OpenAIOkHttpClient; import com.openai.models.responses.Response; import com.openai.models.responses.ResponseCreateParams; public class PlatformOverviewExample { public static void main(String[] args) { OpenAIClient client = OpenAIOkHttpClient.fromEnv(); ResponseCreateParams params = ResponseCreateParams.builder().model(\"gpt-6-astra\").input(\"Write a short bedtime story about a unicorn.\").build(); Response response = client.responses().create(params); response.output().stream() .flatMap(item -> item.message().stream()) .flatMap(message -> message.content().stream()) .flatMap(content -> content.outputText().stream()) .forEach(outputText -> System.out.println(outputText.text())); } }``1 2 3 4 5 6 7 8 9 10 11 12using OpenAI.Responses; #pragma warning disable OPENAI001 string key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!; ResponsesClient client = new(key); ResponseResult response = await client.CreateResponseAsync( \"gpt-6-astra\", \"Write a short bedtime story about a unicorn.\" ); Console.WriteLine(response.GetOutputText());``1 2 3 4 5 6 7 8 9 10require \"openai\" openai = OpenAI::Client.new response = openai.responses.create( model: \"gpt-6-astra\", input: \"Write a short bedtime story about a unicorn.\" ) puts(response.output_text)``1 2 3 4 5openai responses create \\ --model gpt-6-astra \\ --input \"Write a short bedtime story about a unicorn.\" \\ --raw-output \\ --transform 'output.#(type==\"message\").content.0.text'`Build paths[Responses APIMake direct model requests for text, structured output, tools, and multimodal workflows.Start with Responses](/api/docs/guides/text)[Agents SDKBuild code-first agents that orchestrate tools, handoffs, approvals, tracing, and container-based execution.Start with the Agents SDK](/api/docs/guides/agents/quickstart)ModelsCompare model capabilities and specifications.[View all](/api/docs/models)[AstraGPT-6 AstraOur most capable model, built for the hardest end-to-end work](/api/docs/models/gpt-6-astra)[GPT-5.6 SolFlagship model for complex professional work](/api/docs/models/gpt-5.6-sol)[GPT-5.6 TerraGPT-5.6 model that balances intelligence and cost](/api/docs/models/gpt-5.6-terra)[GPT-5.6 LunaGPT-5.6 model optimized for cost-sensitive workloads](/api/docs/models/gpt-5.6-luna)Start building[Read and generate textUse the API to prompt a model and generate text](/api/docs/guides/text)[Use a model's vision capabilitiesAllow models to see and analyze images in your application](/api/docs/guides/images-vision)[Generate images as outputCreate images with GPT Image 2](/api/docs/guides/image-generation)[Build apps with audioAnalyze, transcribe, and generate audio with API endpoints](/api/docs/guides/audio)[Build agentic applicationsUse the API to build agents that use tools and computers](/api/docs/guides/agents)[Achieve complex tasks with reasoningUse reasoning models to carry out complex tasks](/api/docs/guides/reasoning)[Get structured data from modelsUse Structured Outputs to get model responses that adhere to a JSON schema](/api/docs/guides/structured-outputs)[Tailor to your use caseAdjust our models to perform specifically for your use case with fine-tuning, evals, and distillation](/api/docs/guides/model-optimization)[Help centerFrequently asked account and billing questions](https://help.openai.com)[Developer forumDiscuss topics with other developers](https://community.openai.com/)[CookbookOpen-source collection of examples and guides](/cookbook)[StatusCheck the status of OpenAI services](https://status.openai.com)", "znaku_textu": 4994, "slov": 577, "odkazu": 479, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:26", "sha256": "0bdb51ac20a219e108cb6279d26577d5e8997bb03d395d76e2bc9b463ca47f45", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://platform.openai.com/api-keys", "https://help.openai.com/", "https://status.openai.com/"]} {"url": "https://developers.openai.com/api/docs/actions/actions-library", "titulek": "GPT Actions library", "h1": "GPT Actions library", "popis": "Learn how to build and integrate GPT Actions for common applications using OpenAI's guidance.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/actions-library", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/actions-library", "og:site_name": "OpenAI Developers", "og:title": "GPT Actions library", "og:description": "Learn how to build and integrate GPT Actions for common applications using OpenAI's guidance.", "og:image": "https://developers.openai.com/og/api/docs/actions/actions-library.png", "og:image:alt": "GPT Actions library", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Purpose"}, {"uroven": 2, "text": "Getting started"}, {"uroven": 2, "text": "How to access"}, {"uroven": 3, "text": "3rd party Actions cookbook"}, {"uroven": 3, "text": "Middleware Actions cookbook"}, {"uroven": 2, "text": "Give us feedback"}, {"uroven": 2, "text": "Contribute to our library"}, {"uroven": 2, "text": "Disclaimers"}], "markdown": "## Purpose\n\nWhile GPT Actions should be significantly less work for an API developer to set up than an entire application using those APIs from scratch, there’s still some set up required to get GPT Actions up and running. A Library of GPT Actions is meant to provide guidance for building GPT Actions on common applications.\n\n## Getting started\n\nIf you’ve never built an action before, start by reading the [getting started guide](/api/docs/actions/getting-started) first to understand better how actions work.\n\nGenerally, this guide is meant for people with familiarity and comfort with calling API calls. For debugging help, try to explain your issues to ChatGPT - and include screenshots.\n\n## How to access\n\n[The OpenAI Cookbook](/cookbook) has a [directory](/cookbook/topic/chatgpt) of 3rd party applications and middleware application.\n\n### 3rd party Actions cookbook\n\nGPT Actions can integrate with HTTP services directly. GPT Actions leveraging SaaS API directly will authenticate and request resources directly from SaaS providers, such as [Google Drive](/cookbook/examples/chatgpt/gpt_actions_library/gpt_action_google_drive) or [Snowflake](/cookbook/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_direct).\n\n### Middleware Actions cookbook\n\nGPT Actions can benefit from having a middleware. It allows pre-processing, data formatting, data filtering or even connection to endpoints not exposed through HTTP (e.g: databases). Multiple middleware cookbooks are available describing an example implementation path, such as [Azure](/cookbook/examples/chatgpt/gpt_actions_library/gpt_middleware_azure_function), [GCP](/cookbook/examples/chatgpt/gpt_actions_library/gpt_middleware_google_cloud_function) and [AWS](/cookbook/examples/chatgpt/gpt_actions_library/gpt_middleware_aws_function).\n\n## Give us feedback\n\nAre there integrations that you’d like us to prioritize? Are there errors in our integrations? File a PR or issue on the cookbook page’s github, and we’ll take a look.\n\n## Contribute to our library\n\nIf you’re interested in contributing to our library, please follow the below guidelines, then submit a PR in github for us to review. In general, follow the template similar to [this example GPT Action](/cookbook/examples/chatgpt/gpt_actions_library/gpt_action_bigquery).\n\nGuidelines - include the following sections:\n\n- Application Information - describe the 3rd party application, and include a link to app website and API docs\n- Custom GPT Instructions - include the exact instructions to be included in a Custom GPT\n- OpenAPI Schema - include the exact OpenAPI schema to be included in the GPT Action\n- Authentication Instructions - for OAuth, include the exact set of items (authorization URL, token URL, scope, etc.); also include instructions on how to write the callback URL in the application (as well as any other steps)\n- FAQ and Troubleshooting - what are common pitfalls that users may encounter? Write them here and workarounds\n\n## Disclaimers\n\nThis action library is meant to be a guide for interacting with 3rd parties that OpenAI have no control over. These 3rd parties may change their API settings or configurations, and OpenAI cannot guarantee these Actions will work in perpetuity. Please see them as a starting point.\n\nThis guide is meant for developers and people with comfort writing API calls. Non-technical users will likely find these steps challenging.", "znaku_textu": 3349, "slov": 444, "odkazu": 479, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 22:42:35", "sha256": "7ad83e56dfc44ff6d06c38c2bc1f27c42d6bb51adc6cb3b8bcac8a3803c36ccd", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/actions/actions-library/", "titulek": "GPT Actions library", "h1": "GPT Actions library", "popis": "Learn how to build and integrate GPT Actions for common applications using OpenAI's guidance.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/actions-library", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/actions-library", "og:site_name": "OpenAI Developers", "og:title": "GPT Actions library", "og:description": "Learn how to build and integrate GPT Actions for common applications using OpenAI's guidance.", "og:image": "https://developers.openai.com/og/api/docs/actions/actions-library.png", "og:image:alt": "GPT Actions library", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Purpose"}, {"uroven": 2, "text": "Getting started"}, {"uroven": 2, "text": "How to access"}, {"uroven": 3, "text": "3rd party Actions cookbook"}, {"uroven": 3, "text": "Middleware Actions cookbook"}, {"uroven": 2, "text": "Give us feedback"}, {"uroven": 2, "text": "Contribute to our library"}, {"uroven": 2, "text": "Disclaimers"}], "markdown": "## Purpose\n\nWhile GPT Actions should be significantly less work for an API developer to set up than an entire application using those APIs from scratch, there’s still some set up required to get GPT Actions up and running. A Library of GPT Actions is meant to provide guidance for building GPT Actions on common applications.\n\n## Getting started\n\nIf you’ve never built an action before, start by reading the [getting started guide](/api/docs/actions/getting-started) first to understand better how actions work.\n\nGenerally, this guide is meant for people with familiarity and comfort with calling API calls. For debugging help, try to explain your issues to ChatGPT - and include screenshots.\n\n## How to access\n\n[The OpenAI Cookbook](/cookbook) has a [directory](/cookbook/topic/chatgpt) of 3rd party applications and middleware application.\n\n### 3rd party Actions cookbook\n\nGPT Actions can integrate with HTTP services directly. GPT Actions leveraging SaaS API directly will authenticate and request resources directly from SaaS providers, such as [Google Drive](/cookbook/examples/chatgpt/gpt_actions_library/gpt_action_google_drive) or [Snowflake](/cookbook/examples/chatgpt/gpt_actions_library/gpt_action_snowflake_direct).\n\n### Middleware Actions cookbook\n\nGPT Actions can benefit from having a middleware. It allows pre-processing, data formatting, data filtering or even connection to endpoints not exposed through HTTP (e.g: databases). Multiple middleware cookbooks are available describing an example implementation path, such as [Azure](/cookbook/examples/chatgpt/gpt_actions_library/gpt_middleware_azure_function), [GCP](/cookbook/examples/chatgpt/gpt_actions_library/gpt_middleware_google_cloud_function) and [AWS](/cookbook/examples/chatgpt/gpt_actions_library/gpt_middleware_aws_function).\n\n## Give us feedback\n\nAre there integrations that you’d like us to prioritize? Are there errors in our integrations? File a PR or issue on the cookbook page’s github, and we’ll take a look.\n\n## Contribute to our library\n\nIf you’re interested in contributing to our library, please follow the below guidelines, then submit a PR in github for us to review. In general, follow the template similar to [this example GPT Action](/cookbook/examples/chatgpt/gpt_actions_library/gpt_action_bigquery).\n\nGuidelines - include the following sections:\n\n- Application Information - describe the 3rd party application, and include a link to app website and API docs\n- Custom GPT Instructions - include the exact instructions to be included in a Custom GPT\n- OpenAPI Schema - include the exact OpenAPI schema to be included in the GPT Action\n- Authentication Instructions - for OAuth, include the exact set of items (authorization URL, token URL, scope, etc.); also include instructions on how to write the callback URL in the application (as well as any other steps)\n- FAQ and Troubleshooting - what are common pitfalls that users may encounter? Write them here and workarounds\n\n## Disclaimers\n\nThis action library is meant to be a guide for interacting with 3rd parties that OpenAI have no control over. These 3rd parties may change their API settings or configurations, and OpenAI cannot guarantee these Actions will work in perpetuity. Please see them as a starting point.\n\nThis guide is meant for developers and people with comfort writing API calls. Non-technical users will likely find these steps challenging.", "znaku_textu": 3349, "slov": 444, "odkazu": 479, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:27", "sha256": "b9cf91af407744d974510a60ff52230010403d036cf679a79f7f4f7e4ffd1f2c", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/actions/authentication", "titulek": "GPT Action authentication | OpenAI API", "h1": "GPT Action authentication", "popis": "Learn about authentication options for GPT actions, including no authentication, API key, and OAuth methods.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/authentication", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/authentication", "og:site_name": "OpenAI Developers", "og:title": "GPT Action authentication | OpenAI API", "og:description": "Learn about authentication options for GPT actions, including no authentication, API key, and OAuth methods.", "og:image": "https://developers.openai.com/og/api/docs/actions/authentication.png", "og:image:alt": "GPT Action authentication | OpenAI API", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "No authentication"}, {"uroven": 2, "text": "API key authentication"}, {"uroven": 2, "text": "OAuth"}], "markdown": "Actions offer different authentication schemas to accommodate various use cases. To specify the authentication schema for your action, use the GPT editor and select “None”, “API Key”, or “OAuth”.\n\nBy default, the authentication method for all actions is set to “None”, but you can change this and allow different actions to have different authentication methods.\n\n## No authentication\n\nWe support flows without authentication for applications where users can send requests directly to your API without needing an API key or signing in with OAuth.\n\nConsider using no authentication for initial user interactions as you might experience a user drop off if they are forced to sign into an application. You can create a “signed out” experience and then move users to a “signed in” experience by enabling a separate action.\n\n## API key authentication\n\nJust like how a user might already be using your API, we allow API key authentication through the GPT editor UI. We encrypt the secret key when we store it in our database to keep your API key secure.\n\nThis approach is useful if you have an API that takes slightly more consequential actions than the no authentication flow but does not require an individual user to sign in. Adding API key authentication can protect your API and give you more fine-grained access controls along with visibility into where requests are coming from.\n\n## OAuth\n\nActions allow OAuth sign in for each user. This is the best way to provide personalized experiences and make the most powerful actions available to users. A simple example of the OAuth flow with actions will look like the following:\n\n- To start, select “Authentication” in the GPT editor UI, and select “OAuth”.\n- You will be prompted to enter the OAuth client ID, client secret, authorization URL, token URL, and scope.\n - The client ID and secret can be simple text strings but should [follow OAuth best practices](https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/) .\n - We store an encrypted version of the client secret, while the client ID is available to end users.\n- OAuth requests will include the following information: `request={'grant_type': 'authorization_code', 'client_id': 'YOUR_CLIENT_ID', 'client_secret': 'YOUR_CLIENT_SECRET', 'code': 'abc123', 'redirect_uri': 'https://chat.openai.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback'}` Note: `https://chatgpt.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback` is also valid.\n- In order for someone to use an action with OAuth, they will need to send a message that invokes the action and then the user will be presented with a “Sign in to [domain]” button in the ChatGPT UI.\n- The `authorization_url` endpoint should return a response that looks like: `{ \"access_token\": \"example_token\", \"token_type\": \"bearer\", \"refresh_token\": \"example_token\", \"expires_in\": 59 }`\n- During the user sign in process, ChatGPT makes a request to your `authorization_url` using the specified `authorization_content_type` , we expect to get back an access token and optionally a [refresh token](https://auth0.com/learn/refresh-tokens) which we use to periodically fetch a new access token.\n- Each time a user makes a request to the action, the user’s token will be passed in the Authorization header: (“Authorization”: “[Bearer/Basic] [user’s token]”).\n- We require that OAuth applications make use of the [state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters#set-and-compare-state-parameter-values) for security reasons.\n\nFailure to login issues on Custom GPTs (Redirect URLs)?\n\n- Be sure to enable this redirect URL in your OAuth application:\n- #1 Redirect URL: `https://chat.openai.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback` (Different domain possible for some clients)\n- #2 Redirect URL: `https://chatgpt.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback` (Get your GPT ID in the URL bar of the ChatGPT UI once you save) if you have several GPTs you’d need to enable for each or a wildcard depending on risk tolerance.\n- Debug Note: Your Auth Provider will typically log failures (e.g. ‘redirect_uri is not registered for client’), which helps debug login issues as well.", "znaku_textu": 4100, "slov": 611, "odkazu": 475, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 22:42:39", "sha256": "963fb13a0c0e16a2bc41e88bd7e4806e088753ce668c24e1ac53a29ce6759243", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/", "https://auth0.com/learn/refresh-tokens", "https://auth0.com/docs/secure/attack-protection/state-parameters"]} {"url": "https://developers.openai.com/api/docs/actions/authentication/", "titulek": "GPT Action authentication | OpenAI API", "h1": "GPT Action authentication", "popis": "Learn about authentication options for GPT actions, including no authentication, API key, and OAuth methods.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/authentication", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/authentication", "og:site_name": "OpenAI Developers", "og:title": "GPT Action authentication | OpenAI API", "og:description": "Learn about authentication options for GPT actions, including no authentication, API key, and OAuth methods.", "og:image": "https://developers.openai.com/og/api/docs/actions/authentication.png", "og:image:alt": "GPT Action authentication | OpenAI API", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "No authentication"}, {"uroven": 2, "text": "API key authentication"}, {"uroven": 2, "text": "OAuth"}], "markdown": "Actions offer different authentication schemas to accommodate various use cases. To specify the authentication schema for your action, use the GPT editor and select “None”, “API Key”, or “OAuth”.\n\nBy default, the authentication method for all actions is set to “None”, but you can change this and allow different actions to have different authentication methods.\n\n## No authentication\n\nWe support flows without authentication for applications where users can send requests directly to your API without needing an API key or signing in with OAuth.\n\nConsider using no authentication for initial user interactions as you might experience a user drop off if they are forced to sign into an application. You can create a “signed out” experience and then move users to a “signed in” experience by enabling a separate action.\n\n## API key authentication\n\nJust like how a user might already be using your API, we allow API key authentication through the GPT editor UI. We encrypt the secret key when we store it in our database to keep your API key secure.\n\nThis approach is useful if you have an API that takes slightly more consequential actions than the no authentication flow but does not require an individual user to sign in. Adding API key authentication can protect your API and give you more fine-grained access controls along with visibility into where requests are coming from.\n\n## OAuth\n\nActions allow OAuth sign in for each user. This is the best way to provide personalized experiences and make the most powerful actions available to users. A simple example of the OAuth flow with actions will look like the following:\n\n- To start, select “Authentication” in the GPT editor UI, and select “OAuth”.\n- You will be prompted to enter the OAuth client ID, client secret, authorization URL, token URL, and scope.\n - The client ID and secret can be simple text strings but should [follow OAuth best practices](https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/) .\n - We store an encrypted version of the client secret, while the client ID is available to end users.\n- OAuth requests will include the following information: `request={'grant_type': 'authorization_code', 'client_id': 'YOUR_CLIENT_ID', 'client_secret': 'YOUR_CLIENT_SECRET', 'code': 'abc123', 'redirect_uri': 'https://chat.openai.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback'}` Note: `https://chatgpt.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback` is also valid.\n- In order for someone to use an action with OAuth, they will need to send a message that invokes the action and then the user will be presented with a “Sign in to [domain]” button in the ChatGPT UI.\n- The `authorization_url` endpoint should return a response that looks like: `{ \"access_token\": \"example_token\", \"token_type\": \"bearer\", \"refresh_token\": \"example_token\", \"expires_in\": 59 }`\n- During the user sign in process, ChatGPT makes a request to your `authorization_url` using the specified `authorization_content_type` , we expect to get back an access token and optionally a [refresh token](https://auth0.com/learn/refresh-tokens) which we use to periodically fetch a new access token.\n- Each time a user makes a request to the action, the user’s token will be passed in the Authorization header: (“Authorization”: “[Bearer/Basic] [user’s token]”).\n- We require that OAuth applications make use of the [state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters#set-and-compare-state-parameter-values) for security reasons.\n\nFailure to login issues on Custom GPTs (Redirect URLs)?\n\n- Be sure to enable this redirect URL in your OAuth application:\n- #1 Redirect URL: `https://chat.openai.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback` (Different domain possible for some clients)\n- #2 Redirect URL: `https://chatgpt.com/aip/{g-YOUR-GPT-ID-HERE}/oauth/callback` (Get your GPT ID in the URL bar of the ChatGPT UI once you save) if you have several GPTs you’d need to enable for each or a wildcard depending on risk tolerance.\n- Debug Note: Your Auth Provider will typically log failures (e.g. ‘redirect_uri is not registered for client’), which helps debug login issues as well.", "znaku_textu": 4100, "slov": 611, "odkazu": 475, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:28", "sha256": "fc3aaf90c4f621c8504cbc0c5450bbd457f08c6ef7c0a484d707bfa666cdfb76", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/", "https://auth0.com/learn/refresh-tokens", "https://auth0.com/docs/secure/attack-protection/state-parameters"]} {"url": "https://developers.openai.com/api/docs/actions/data-retrieval", "titulek": "Data retrieval with GPT Actions", "h1": "Data retrieval with GPT Actions", "popis": "Learn about performing data retrieval using APIs, relational databases, and vector databases with GPT Actions.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/data-retrieval", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/data-retrieval", "og:site_name": "OpenAI Developers", "og:title": "Data retrieval with GPT Actions", "og:description": "Learn about performing data retrieval using APIs, relational databases, and vector databases with GPT Actions.", "og:image": "https://developers.openai.com/og/api/docs/actions/data-retrieval.png", "og:image:alt": "Data retrieval with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Data retrieval using APIs"}, {"uroven": 2, "text": "Data retrieval using Relational Databases"}, {"uroven": 2, "text": "Data retrieval using Vector Databases"}, {"uroven": 3, "text": "Middleware for vector databases"}], "markdown": "One of the most common tasks an action in a GPT can perform is data retrieval. An action might:\n\n1. Access an API to retrieve data based on a keyword search\n2. Access a relational database to retrieve records based on a structured query\n3. Access a vector database to retrieve text chunks based on semantic search\n\nWe’ll explore considerations specific to the various types of retrieval integrations in this guide.\n\n## Data retrieval using APIs\n\nMany organizations rely on 3rd party software to store important data. Think Salesforce for customer data, Zendesk for support data, Confluence for internal process data, and Google Drive for business documents. These providers often provide REST APIs which enable external systems to search for and retrieve information.\n\nWhen building an action to integrate with a provider’s REST API, start by reviewing the existing documentation. You’ll need to confirm a few things:\n\n1. Retrieval methods\n - **Search** - Each provider will support different search semantics, but generally you want a method which takes a keyword or query string and returns a list of matching documents. See [Google Drive’s `file.list` method](https://developers.google.com/drive/api/guides/search-files) for an example.\n - **Get** - Once you’ve found matching documents, you need a way to retrieve them. See [Google Drive’s `file.get` method](https://developers.google.com/drive/api/reference/rest/v3/files/get) for an example.\n2. Authentication scheme\n - For example, [Google Drive uses OAuth](https://developers.google.com/workspace/guides/configure-oauth-consent) to authenticate users and ensure that only their available files are available for retrieval.\n3. OpenAPI spec\n - Some providers will provide an OpenAPI spec document which you can import directly into your action. See [Zendesk](https://developer.zendesk.com/api-reference/ticketing/introduction/#download-openapi-file) , for an example.\n - You may want to remove references to methods your GPT *won’t* access, which constrains the actions your GPT can perform.\n - For providers who *don’t* provide an OpenAPI spec document, you can create your own using the [ActionsGPT](https://chatgpt.com/g/g-TYEliDU6A-actionsgpt) (a GPT developed by OpenAI).\n\nYour goal is to get the GPT to use the action to search for and retrieve documents containing context which are relevant to the user’s prompt. Your GPT follows your instructions to use the provided search and get methods to achieve this goal.\n\n## Data retrieval using Relational Databases\n\nOrganizations use relational databases to store a variety of records pertaining to their business. These records can contain useful context that will help improve your GPT’s responses. For example, let’s say you are building a GPT to help users understand the status of an insurance claim. If the GPT can look up claims in a relational database based on a claims number, the GPT will be much more useful to the user.\n\nWhen building an action to integrate with a relational database, there are a few things to keep in mind:\n\n1. Availability of REST APIs\n - Many relational databases do not natively expose a REST API for processing queries. In that case, you may need to build or buy middleware which can sit between your GPT and the database.\n - This middleware should do the following:\n - Accept a formal query string\n - Pass the query string to the database\n - Respond back to the requester with the returned records\n2. Accessibility from the public internet\n - Unlike APIs which are designed to be accessed from the public internet, relational databases are traditionally designed to be used within an organization’s application infrastructure. Because GPTs are hosted on OpenAI’s infrastructure, you’ll need to make sure that any APIs you expose are accessible outside of your firewall.\n3. Complex query strings\n - Relational databases uses formal query syntax like SQL to retrieve relevant records. This means that you need to provide additional instructions to the GPT indicating which query syntax is supported. The good news is that GPTs are usually very good at generating formal queries based on user input.\n4. Database permissions\n - Although databases support user-level permissions, it is likely that your end users won’t have permission to access the database directly. If you opt to use a service account to provide access, consider giving the service account read-only permissions. This can avoid inadvertently overwriting or deleting existing data.\n\nYour goal is to get the GPT to write a formal query related to the user’s prompt, submit the query via the action, and then use the returned records to augment the response.\n\n## Data retrieval using Vector Databases\n\nIf you want to equip your GPT with the most relevant search results, you might consider integrating your GPT with a vector database which supports semantic search as described above. There are many managed and self hosted solutions available on the market, [see here for a partial list](https://github.com/openai/chatgpt-retrieval-plugin#choosing-a-vector-database).\n\nWhen building an action to integrate with a vector database, there are a few things to keep in mind:\n\n1. Availability of REST APIs\n - Many relational databases do not natively expose a REST API for processing queries. In that case, you may need to build or buy middleware which can sit between your GPT and the database (more on middleware below).\n2. Accessibility from the public internet\n - Unlike APIs which are designed to be accessed from the public internet, relational databases are traditionally designed to be used within an organization’s application infrastructure. Because GPTs are hosted on OpenAI’s infrastructure, you’ll need to make sure that any APIs you expose are accessible outside of your firewall.\n3. Query embedding\n - As discussed above, vector databases typically accept a vector embedding (as opposed to plain text) as query input. This means that you need to use an embedding API to convert the query input into a vector embedding before you can submit it to the vector database. This conversion is best handled in the REST API gateway, so that the GPT can submit a plaintext query string.\n4. Database permissions\n - Because vector databases store text chunks as opposed to full documents, it can be difficult to maintain user permissions which might have existed on the original source documents. Remember that any user who can access your GPT will have access to all of the text chunks in the database and plan accordingly.\n\n### Middleware for vector databases\n\nAs described above, middleware for vector databases typically needs to do two things:\n\n1. Expose access to the vector database via a REST API\n2. Convert plaintext query strings into vector embeddings\n\nThe goal is to get your GPT to submit a relevant query to a vector database to trigger a semantic search, and then use the returned text chunks to augment the response.", "znaku_textu": 6851, "slov": 1066, "odkazu": 478, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 22:42:28", "sha256": "26453af10766205925f3f9d6ac634c085437c80461255c7186ac591f43cefd59", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://developers.google.com/drive/api/guides/search-files", "https://developers.google.com/drive/api/reference/rest/v3/files/get", "https://developers.google.com/workspace/guides/configure-oauth-consent", "https://developer.zendesk.com/api-reference/ticketing/introduction/", "https://chatgpt.com/g/g-TYEliDU6A-actionsgpt", "https://github.com/openai/chatgpt-retrieval-plugin"]} {"url": "https://developers.openai.com/api/docs/actions/data-retrieval/", "titulek": "Data retrieval with GPT Actions", "h1": "Data retrieval with GPT Actions", "popis": "Learn about performing data retrieval using APIs, relational databases, and vector databases with GPT Actions.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/data-retrieval", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/data-retrieval", "og:site_name": "OpenAI Developers", "og:title": "Data retrieval with GPT Actions", "og:description": "Learn about performing data retrieval using APIs, relational databases, and vector databases with GPT Actions.", "og:image": "https://developers.openai.com/og/api/docs/actions/data-retrieval.png", "og:image:alt": "Data retrieval with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Data retrieval using APIs"}, {"uroven": 2, "text": "Data retrieval using Relational Databases"}, {"uroven": 2, "text": "Data retrieval using Vector Databases"}, {"uroven": 3, "text": "Middleware for vector databases"}], "markdown": "One of the most common tasks an action in a GPT can perform is data retrieval. An action might:\n\n1. Access an API to retrieve data based on a keyword search\n2. Access a relational database to retrieve records based on a structured query\n3. Access a vector database to retrieve text chunks based on semantic search\n\nWe’ll explore considerations specific to the various types of retrieval integrations in this guide.\n\n## Data retrieval using APIs\n\nMany organizations rely on 3rd party software to store important data. Think Salesforce for customer data, Zendesk for support data, Confluence for internal process data, and Google Drive for business documents. These providers often provide REST APIs which enable external systems to search for and retrieve information.\n\nWhen building an action to integrate with a provider’s REST API, start by reviewing the existing documentation. You’ll need to confirm a few things:\n\n1. Retrieval methods\n - **Search** - Each provider will support different search semantics, but generally you want a method which takes a keyword or query string and returns a list of matching documents. See [Google Drive’s `file.list` method](https://developers.google.com/drive/api/guides/search-files) for an example.\n - **Get** - Once you’ve found matching documents, you need a way to retrieve them. See [Google Drive’s `file.get` method](https://developers.google.com/drive/api/reference/rest/v3/files/get) for an example.\n2. Authentication scheme\n - For example, [Google Drive uses OAuth](https://developers.google.com/workspace/guides/configure-oauth-consent) to authenticate users and ensure that only their available files are available for retrieval.\n3. OpenAPI spec\n - Some providers will provide an OpenAPI spec document which you can import directly into your action. See [Zendesk](https://developer.zendesk.com/api-reference/ticketing/introduction/#download-openapi-file) , for an example.\n - You may want to remove references to methods your GPT *won’t* access, which constrains the actions your GPT can perform.\n - For providers who *don’t* provide an OpenAPI spec document, you can create your own using the [ActionsGPT](https://chatgpt.com/g/g-TYEliDU6A-actionsgpt) (a GPT developed by OpenAI).\n\nYour goal is to get the GPT to use the action to search for and retrieve documents containing context which are relevant to the user’s prompt. Your GPT follows your instructions to use the provided search and get methods to achieve this goal.\n\n## Data retrieval using Relational Databases\n\nOrganizations use relational databases to store a variety of records pertaining to their business. These records can contain useful context that will help improve your GPT’s responses. For example, let’s say you are building a GPT to help users understand the status of an insurance claim. If the GPT can look up claims in a relational database based on a claims number, the GPT will be much more useful to the user.\n\nWhen building an action to integrate with a relational database, there are a few things to keep in mind:\n\n1. Availability of REST APIs\n - Many relational databases do not natively expose a REST API for processing queries. In that case, you may need to build or buy middleware which can sit between your GPT and the database.\n - This middleware should do the following:\n - Accept a formal query string\n - Pass the query string to the database\n - Respond back to the requester with the returned records\n2. Accessibility from the public internet\n - Unlike APIs which are designed to be accessed from the public internet, relational databases are traditionally designed to be used within an organization’s application infrastructure. Because GPTs are hosted on OpenAI’s infrastructure, you’ll need to make sure that any APIs you expose are accessible outside of your firewall.\n3. Complex query strings\n - Relational databases uses formal query syntax like SQL to retrieve relevant records. This means that you need to provide additional instructions to the GPT indicating which query syntax is supported. The good news is that GPTs are usually very good at generating formal queries based on user input.\n4. Database permissions\n - Although databases support user-level permissions, it is likely that your end users won’t have permission to access the database directly. If you opt to use a service account to provide access, consider giving the service account read-only permissions. This can avoid inadvertently overwriting or deleting existing data.\n\nYour goal is to get the GPT to write a formal query related to the user’s prompt, submit the query via the action, and then use the returned records to augment the response.\n\n## Data retrieval using Vector Databases\n\nIf you want to equip your GPT with the most relevant search results, you might consider integrating your GPT with a vector database which supports semantic search as described above. There are many managed and self hosted solutions available on the market, [see here for a partial list](https://github.com/openai/chatgpt-retrieval-plugin#choosing-a-vector-database).\n\nWhen building an action to integrate with a vector database, there are a few things to keep in mind:\n\n1. Availability of REST APIs\n - Many relational databases do not natively expose a REST API for processing queries. In that case, you may need to build or buy middleware which can sit between your GPT and the database (more on middleware below).\n2. Accessibility from the public internet\n - Unlike APIs which are designed to be accessed from the public internet, relational databases are traditionally designed to be used within an organization’s application infrastructure. Because GPTs are hosted on OpenAI’s infrastructure, you’ll need to make sure that any APIs you expose are accessible outside of your firewall.\n3. Query embedding\n - As discussed above, vector databases typically accept a vector embedding (as opposed to plain text) as query input. This means that you need to use an embedding API to convert the query input into a vector embedding before you can submit it to the vector database. This conversion is best handled in the REST API gateway, so that the GPT can submit a plaintext query string.\n4. Database permissions\n - Because vector databases store text chunks as opposed to full documents, it can be difficult to maintain user permissions which might have existed on the original source documents. Remember that any user who can access your GPT will have access to all of the text chunks in the database and plan accordingly.\n\n### Middleware for vector databases\n\nAs described above, middleware for vector databases typically needs to do two things:\n\n1. Expose access to the vector database via a REST API\n2. Convert plaintext query strings into vector embeddings\n\nThe goal is to get your GPT to submit a relevant query to a vector database to trigger a semantic search, and then use the returned text chunks to augment the response.", "znaku_textu": 6851, "slov": 1066, "odkazu": 478, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:29", "sha256": "82a27e66d2190b1f725b49f91215942295e6a815afee69c243fd3dd3fa090461", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://developers.google.com/drive/api/guides/search-files", "https://developers.google.com/drive/api/reference/rest/v3/files/get", "https://developers.google.com/workspace/guides/configure-oauth-consent", "https://developer.zendesk.com/api-reference/ticketing/introduction/", "https://chatgpt.com/g/g-TYEliDU6A-actionsgpt", "https://github.com/openai/chatgpt-retrieval-plugin"]} {"url": "https://developers.openai.com/api/docs/actions/getting-started", "titulek": "Getting started with GPT Actions", "h1": "Getting started with GPT Actions", "popis": "Learn how to set up and test GPT actions from scratch with the OpenAI API.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/getting-started", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/getting-started", "og:site_name": "OpenAI Developers", "og:title": "Getting started with GPT Actions", "og:description": "Learn how to set up and test GPT actions from scratch with the OpenAI API.", "og:image": "https://developers.openai.com/og/api/docs/actions/getting-started.png", "og:image:alt": "Getting started with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Weather.gov example"}, {"uroven": 2, "text": "Step 1: Write and test Open API schema (using Actions GPT)"}, {"uroven": 2, "text": "Step 2: Identify authentication requirements"}, {"uroven": 2, "text": "Step 3: Create the GPT Action and test"}, {"uroven": 3, "text": "Test the GPT Action"}, {"uroven": 2, "text": "Step 4: Set up callback URL in the 3rd party app"}, {"uroven": 2, "text": "Step 5: Evaluate the Custom GPT"}, {"uroven": 2, "text": "Common Debugging Steps"}], "markdown": "## Weather.gov example\n\nThe NSW (National Weather Service) maintains a [public API](https://www.weather.gov/documentation/services-web-api) that users can query to receive a weather forecast for any lat-long point. To retrieve a forecast, there’s 2 steps:\n\n1. A user provides a lat-long to the api.weather.gov/points API and receives back a WFO (weather forecast office), grid-X, and grid-Y coordinates\n2. Those 3 elements feed into the api.weather.gov/forecast API to retrieve a forecast for that coordinate\n\nFor the purpose of this exercise, let’s build a Custom GPT where a user writes a city, landmark, or lat-long coordinates, and the Custom GPT answers questions about a weather forecast in that location.\n\n## Step 1: Write and test Open API schema (using Actions GPT)\n\nA GPT Action requires an [Open API schema](https://swagger.io/specification/) to describe the parameters of the API call, which is a standard for describing APIs.\n\nOpenAI released a public [Actions GPT](https://chatgpt.com/g/g-TYEliDU6A-actionsgpt) to help developers write this schema. For example, go to the Actions GPT and ask: *“Go to [https://www.weather.gov/documentation/services-web-api](https://www.weather.gov/documentation/services-web-api) and read the documentation on that page. Build an Open API Schema for the /points/{latitude},{longitude} and /gridpoints/{office}/{gridX},{gridY}/forecast” API calls”*\n\nChatGPT uses the **info** at the top (including the description in particular) to determine if this action is relevant for the user query.\n\n```\n1234info: title: NWS Weather API description: Access to weather data including forecasts, alerts, and observations. version: 1.0.0\n```\n\nThen the **parameters** below further define each part of the schema. For example, we’re informing ChatGPT that the *office* parameter refers to the Weather Forecast Office (WFO).\n\n```\n1234567891011/gridpoints/{office}/{gridX},{gridY}/forecast: get: operationId: getGridpointForecast summary: Get forecast for a given grid point parameters: - name: office in: path required: true schema: type: string description: Weather Forecast Office ID\n```\n\n**Key:** Pay special attention to the **schema names** and **descriptions** that you use in this Open API schema. ChatGPT uses those names and descriptions to understand (a) which API action should be called and (b) which parameter should be used. If a field is restricted to only certain values, you can also provide an “enum” with descriptive category names.\n\nWhile you can just try the Open API schema directly in a GPT Action, debugging directly in ChatGPT can be a challenge. We recommend using a 3rd party service, like [Postman](https://www.postman.com/), to test that your API call is working properly. Postman is free to sign up, verbose in its error-handling, and comprehensive in its authentication options. It even gives you the option of importing Open API schemas directly (see below).\n\n## Step 2: Identify authentication requirements\n\nThis Weather 3rd party service does not require authentication, so you can skip that step for this Custom GPT. For other GPT Actions that do require authentication, there are 2 options: API Key or OAuth. Asking ChatGPT can help you get started for most common applications. For example, if I needed to use OAuth to authenticate to Google Cloud, I can provide a screenshot and ask for details: *“I’m building a connection to Google Cloud via OAuth. Please provide instructions for how to fill out each of these boxes.”*\n\nOften, ChatGPT provides the correct directions on all 5 elements. Once you have those basics ready, try testing and debugging the authentication in Postman or another similar service. If you encounter an error, provide the error to ChatGPT, and it can usually help you debug from there.\n\n## Step 3: Create the GPT Action and test\n\nNow is the time to create your Custom GPT. If you’ve never created a Custom GPT before, start at our [Creating a GPT guide](https://help.openai.com/en/articles/8554397-creating-a-gpt).\n\n1. Provide a name, description, and image to describe your Custom GPT\n2. Go to the Action section and paste in your Open API schema. Take a note of the Action names and json parameters when writing your instructions.\n3. Add in your authentication settings\n4. Go back to the main page and add in instructions\n\n### Test the GPT Action\n\nNext to each action, you’ll see a **Test** button. Click on that for each action. In the test, you can see the detailed input and output of each API call.\n\nIf your API call is working in a 3rd party tool like Postman and not in ChatGPT, there are a few possible culprits:\n\n- The parameters in ChatGPT are wrong or missing\n- An authentication issue in ChatGPT\n- Your instructions are incomplete or unclear\n- The descriptions in the Open API schema are unclear\n\n## Step 4: Set up callback URL in the 3rd party app\n\nIf your GPT Action uses OAuth Authentication, you’ll need to set up the callback URL in your 3rd party application. Once you set up a GPT Action with OAuth, ChatGPT provides you with a callback URL (this will update any time you update one of the OAuth parameters). Copy that callback URL and add it to the appropriate place in your application.\n\n## Step 5: Evaluate the Custom GPT\n\nEven though you tested the GPT Action in the step above, you still need to evaluate if the Instructions and GPT Action function in the way users expect. Try to come up with at least 5-10 representative questions (the more, the better) of an **“evaluation set”** of questions to ask your Custom GPT.\n\n**Key:** Test that the Custom GPT handles each one of your questions as you expect.\n\nAn example question: *“What should I pack for a trip to the White House this weekend?”* tests the Custom GPT’s ability to: (1) convert a landmark to a lat-long, (2) run both GPT Actions, and (3) answer the user’s question.\n\n## Common Debugging Steps\n\n*Challenge:* The GPT Action is calling the wrong API call (or not calling it at all)\n\n- *Solution:* Make sure the descriptions of the Actions are clear - and refer to the Action names in your Custom GPT Instructions\n\n*Challenge:* The GPT Action is calling the right API call but not using the parameters correctly\n\n- *Solution:* Add or modify the descriptions of the parameters in the GPT Action\n\n*Challenge:* The Custom GPT is not working but I am not getting a clear error\n\n- *Solution:* Make sure to test the Action - there are more robust logs in the test window. If that is still unclear, use Postman or another 3rd party service to better diagnose.\n\n*Challenge:* The Custom GPT is giving an authentication error\n\n- *Solution:* Make sure your callback URL is set up correctly. Try testing the exact same authentication settings in Postman or another 3rd party service\n\n*Challenge:* The Custom GPT cannot handle more difficult / ambiguous questions\n\n- *Solution:* Try to prompt engineer your instructions in the Custom GPT. See examples in our [prompt engineering guide](/api/docs/guides/prompt-engineering)\n\nThis concludes the guide to building a Custom GPT. Good luck building and leveraging the [OpenAI developer forum](https://community.openai.com/) if you have additional questions.", "znaku_textu": 7035, "slov": 1124, "odkazu": 477, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 22:42:27", "sha256": "f7e728ea22687b72aa58b1b75b18589f4723e2962c293fd51f6bc35c238fcf9e", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://www.weather.gov/documentation/services-web-api", "https://swagger.io/specification/", "https://chatgpt.com/g/g-TYEliDU6A-actionsgpt", "https://www.postman.com/", "https://help.openai.com/en/articles/8554397-creating-a-gpt"]} {"url": "https://developers.openai.com/api/docs/actions/getting-started/", "titulek": "Getting started with GPT Actions", "h1": "Getting started with GPT Actions", "popis": "Learn how to set up and test GPT actions from scratch with the OpenAI API.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/getting-started", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/getting-started", "og:site_name": "OpenAI Developers", "og:title": "Getting started with GPT Actions", "og:description": "Learn how to set up and test GPT actions from scratch with the OpenAI API.", "og:image": "https://developers.openai.com/og/api/docs/actions/getting-started.png", "og:image:alt": "Getting started with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Weather.gov example"}, {"uroven": 2, "text": "Step 1: Write and test Open API schema (using Actions GPT)"}, {"uroven": 2, "text": "Step 2: Identify authentication requirements"}, {"uroven": 2, "text": "Step 3: Create the GPT Action and test"}, {"uroven": 3, "text": "Test the GPT Action"}, {"uroven": 2, "text": "Step 4: Set up callback URL in the 3rd party app"}, {"uroven": 2, "text": "Step 5: Evaluate the Custom GPT"}, {"uroven": 2, "text": "Common Debugging Steps"}], "markdown": "## Weather.gov example\n\nThe NSW (National Weather Service) maintains a [public API](https://www.weather.gov/documentation/services-web-api) that users can query to receive a weather forecast for any lat-long point. To retrieve a forecast, there’s 2 steps:\n\n1. A user provides a lat-long to the api.weather.gov/points API and receives back a WFO (weather forecast office), grid-X, and grid-Y coordinates\n2. Those 3 elements feed into the api.weather.gov/forecast API to retrieve a forecast for that coordinate\n\nFor the purpose of this exercise, let’s build a Custom GPT where a user writes a city, landmark, or lat-long coordinates, and the Custom GPT answers questions about a weather forecast in that location.\n\n## Step 1: Write and test Open API schema (using Actions GPT)\n\nA GPT Action requires an [Open API schema](https://swagger.io/specification/) to describe the parameters of the API call, which is a standard for describing APIs.\n\nOpenAI released a public [Actions GPT](https://chatgpt.com/g/g-TYEliDU6A-actionsgpt) to help developers write this schema. For example, go to the Actions GPT and ask: *“Go to [https://www.weather.gov/documentation/services-web-api](https://www.weather.gov/documentation/services-web-api) and read the documentation on that page. Build an Open API Schema for the /points/{latitude},{longitude} and /gridpoints/{office}/{gridX},{gridY}/forecast” API calls”*\n\nChatGPT uses the **info** at the top (including the description in particular) to determine if this action is relevant for the user query.\n\n```\n1234info: title: NWS Weather API description: Access to weather data including forecasts, alerts, and observations. version: 1.0.0\n```\n\nThen the **parameters** below further define each part of the schema. For example, we’re informing ChatGPT that the *office* parameter refers to the Weather Forecast Office (WFO).\n\n```\n1234567891011/gridpoints/{office}/{gridX},{gridY}/forecast: get: operationId: getGridpointForecast summary: Get forecast for a given grid point parameters: - name: office in: path required: true schema: type: string description: Weather Forecast Office ID\n```\n\n**Key:** Pay special attention to the **schema names** and **descriptions** that you use in this Open API schema. ChatGPT uses those names and descriptions to understand (a) which API action should be called and (b) which parameter should be used. If a field is restricted to only certain values, you can also provide an “enum” with descriptive category names.\n\nWhile you can just try the Open API schema directly in a GPT Action, debugging directly in ChatGPT can be a challenge. We recommend using a 3rd party service, like [Postman](https://www.postman.com/), to test that your API call is working properly. Postman is free to sign up, verbose in its error-handling, and comprehensive in its authentication options. It even gives you the option of importing Open API schemas directly (see below).\n\n## Step 2: Identify authentication requirements\n\nThis Weather 3rd party service does not require authentication, so you can skip that step for this Custom GPT. For other GPT Actions that do require authentication, there are 2 options: API Key or OAuth. Asking ChatGPT can help you get started for most common applications. For example, if I needed to use OAuth to authenticate to Google Cloud, I can provide a screenshot and ask for details: *“I’m building a connection to Google Cloud via OAuth. Please provide instructions for how to fill out each of these boxes.”*\n\nOften, ChatGPT provides the correct directions on all 5 elements. Once you have those basics ready, try testing and debugging the authentication in Postman or another similar service. If you encounter an error, provide the error to ChatGPT, and it can usually help you debug from there.\n\n## Step 3: Create the GPT Action and test\n\nNow is the time to create your Custom GPT. If you’ve never created a Custom GPT before, start at our [Creating a GPT guide](https://help.openai.com/en/articles/8554397-creating-a-gpt).\n\n1. Provide a name, description, and image to describe your Custom GPT\n2. Go to the Action section and paste in your Open API schema. Take a note of the Action names and json parameters when writing your instructions.\n3. Add in your authentication settings\n4. Go back to the main page and add in instructions\n\n### Test the GPT Action\n\nNext to each action, you’ll see a **Test** button. Click on that for each action. In the test, you can see the detailed input and output of each API call.\n\nIf your API call is working in a 3rd party tool like Postman and not in ChatGPT, there are a few possible culprits:\n\n- The parameters in ChatGPT are wrong or missing\n- An authentication issue in ChatGPT\n- Your instructions are incomplete or unclear\n- The descriptions in the Open API schema are unclear\n\n## Step 4: Set up callback URL in the 3rd party app\n\nIf your GPT Action uses OAuth Authentication, you’ll need to set up the callback URL in your 3rd party application. Once you set up a GPT Action with OAuth, ChatGPT provides you with a callback URL (this will update any time you update one of the OAuth parameters). Copy that callback URL and add it to the appropriate place in your application.\n\n## Step 5: Evaluate the Custom GPT\n\nEven though you tested the GPT Action in the step above, you still need to evaluate if the Instructions and GPT Action function in the way users expect. Try to come up with at least 5-10 representative questions (the more, the better) of an **“evaluation set”** of questions to ask your Custom GPT.\n\n**Key:** Test that the Custom GPT handles each one of your questions as you expect.\n\nAn example question: *“What should I pack for a trip to the White House this weekend?”* tests the Custom GPT’s ability to: (1) convert a landmark to a lat-long, (2) run both GPT Actions, and (3) answer the user’s question.\n\n## Common Debugging Steps\n\n*Challenge:* The GPT Action is calling the wrong API call (or not calling it at all)\n\n- *Solution:* Make sure the descriptions of the Actions are clear - and refer to the Action names in your Custom GPT Instructions\n\n*Challenge:* The GPT Action is calling the right API call but not using the parameters correctly\n\n- *Solution:* Add or modify the descriptions of the parameters in the GPT Action\n\n*Challenge:* The Custom GPT is not working but I am not getting a clear error\n\n- *Solution:* Make sure to test the Action - there are more robust logs in the test window. If that is still unclear, use Postman or another 3rd party service to better diagnose.\n\n*Challenge:* The Custom GPT is giving an authentication error\n\n- *Solution:* Make sure your callback URL is set up correctly. Try testing the exact same authentication settings in Postman or another 3rd party service\n\n*Challenge:* The Custom GPT cannot handle more difficult / ambiguous questions\n\n- *Solution:* Try to prompt engineer your instructions in the Custom GPT. See examples in our [prompt engineering guide](/api/docs/guides/prompt-engineering)\n\nThis concludes the guide to building a Custom GPT. Good luck building and leveraging the [OpenAI developer forum](https://community.openai.com/) if you have additional questions.", "znaku_textu": 7035, "slov": 1124, "odkazu": 477, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:30", "sha256": "f1b0ccf3099dbb2838b74112c8a6e354f69830c205a50fbf13f6b9806a041401", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://www.weather.gov/documentation/services-web-api", "https://swagger.io/specification/", "https://chatgpt.com/g/g-TYEliDU6A-actionsgpt", "https://www.postman.com/", "https://help.openai.com/en/articles/8554397-creating-a-gpt"]} {"url": "https://developers.openai.com/api/docs/actions/getting-started/including-files", "titulek": "Sending and returning files with GPT Actions", "h1": "Sending and returning files with GPT Actions", "popis": "Learn how to send and return files using GPT Actions in the OpenAI API.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/sending-files", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/sending-files", "og:site_name": "OpenAI Developers", "og:title": "Sending and returning files with GPT Actions", "og:description": "Learn how to send and return files using GPT Actions in the OpenAI API.", "og:image": "https://developers.openai.com/og/api/docs/actions/sending-files.png", "og:image:alt": "Sending and returning files with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Sending files"}, {"uroven": 3, "text": "OpenAPI Example"}, {"uroven": 2, "text": "Returning files"}, {"uroven": 3, "text": "Inline option"}, {"uroven": 3, "text": "URL option"}], "markdown": "## Sending files\n\nPOST requests can include up to ten files (including DALL-E generated images) from the conversation. They will be sent as URLs which are valid for five minutes.\n\nFor files to be part of your POST request, the parameter must be named `openaiFileIdRefs` and the description should explain to the model the type and quantity of the files which your API is expecting.\n\nThe `openaiFileIdRefs` parameter will be populated with an array of JSON objects. Each object contains:\n\n- `name` The name of the file. This will be an auto generated name when created by DALL-E.\n- `id` A stable identifier for the file.\n- `mime_type` The mime type of the file. For user uploaded files this is based on file extension.\n- `download_link` The URL to fetch the file which is valid for five minutes.\n\nHere’s an example of an `openaiFileIdRefs` array with two elements:\n\n```\n1234567891011121314[ { \"name\": \"dalle-Lh2tg7WuosbyR9hk\", \"id\": \"file-XFlOqJYTPBPwMZE3IopCBv1Z\", \"mime_type\": \"image/webp\", \"download_link\": \"https://files.oaiusercontent.com/file-XFlOqJYTPBPwMZE3IopCBv1Z?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D31536000%2C%20immutable&rscd=attachment%3B%20filename%3Da580bae6-ea30-478e-a3e2-1f6c06c3e02f.webp&sig=ZPWol5eXACxU1O9azLwRNgKVidCe%2BwgMOc/TdrPGYII%3D\" }, { \"name\": \"2023 Benefits Booklet.pdf\", \"id\": \"file-s5nX7o4junn2ig0J84r8Q0Ew\", \"mime_type\": \"application/pdf\", \"download_link\": \"https://files.oaiusercontent.com/file-s5nX7o4junn2ig0J84r8Q0Ew?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D299%2C%20immutable&rscd=attachment%3B%20filename%3D2023%2520Benefits%2520Booklet.pdf&sig=Ivhviy%2BrgoyUjxZ%2BingpwtUwsA4%2BWaRfXy8ru9AfcII%3D\" } ]\n```\n\nActions can include files uploaded by the user, images generated by DALL-E, and files created by Code Interpreter.\n\n### OpenAPI Example\n\n```\n12345678910111213141516/createWidget: post: operationId: createWidget summary: Creates a widget based on an image. description: Uploads a file reference using its file id. This file should be an image created by DALL·E or uploaded by the user. JPG, WEBP, and PNG are supported for widget creation. requestBody: required: true content: application/json: schema: type: object properties: openaiFileIdRefs: type: array items: type: string\n```\n\nWhile this schema shows `openaiFileIdRefs` as being an array of type `string`, at runtime this will be populated with an array of JSON objects as previously shown.\n\n## Returning files\n\nRequests may return up to 10 files. Each file may be up to 10 MB and cannot be an image or video.\n\nThese files will become part of the conversation similarly to if a user uploaded them, meaning they may be made available to code interpreter, file search, and sent as part of subsequent action invocations. In the web app users will see that the files have been returned and can download them.\n\nTo return files, the body of the response must contain an `openaiFileResponse` parameter. This parameter must always be an array and must be populated in one of two ways.\n\n### Inline option\n\nEach element of the array is a JSON object which contains:\n\n- `name` The name of the file. This will be visible to the user.\n- `mime_type` The MIME type of the file. This is used to determine eligibility and which features have access to the file.\n- `content` The base64 encoded contents of the file.\n\nHere’s an example of an openaiFileResponse array with two elements:\n\n```\n123456789101112[ { \"name\": \"example_document.pdf\", \"mime_type\": \"application/pdf\", \"content\": \"JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+CnN0cmVhbQpHhD93PQplbmRzdHJlYW0KZW5kb2JqCg==\" }, { \"name\": \"sample_spreadsheet.csv\", \"mime_type\": \"text/csv\", \"content\": \"iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" } ]\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526272829303132333435/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: \"200\": description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: object properties: name: type: string description: The name of the file. mime_type: type: string description: The MIME type of the file. content: type: string format: byte description: The content of the file in base64 encoding.\n```\n\n### URL option\n\nEach element of the array is a URL referencing a file to be downloaded. The headers `Content-Disposition` and `Content-Type` must be set such that a file name and MIME type can be determined. The name of the file will be visible to the user. The MIME type of the file determines eligibility and which features have access to the file.\n\nThere is a 10 second timeout for fetching each file.\n\nHere’s an example of an `openaiFileResponse` array with two elements:\n\n```\n1234[ \"https://example.com/f/dca89f18-16d4-4a65-8ea2-ededced01646\", \"https://example.com/f/01fad6b0-635b-4803-a583-0f678b2e6153\" ]\n```\n\nHere’s an example of the required headers for each URL:\n\n```\nContent-Type: application/pdf Content-Disposition: attachment; filename=\"example_document.pdf\"\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: '200': description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: string format: uri description: URLs to fetch the files.\n```", "znaku_textu": 5910, "slov": 772, "odkazu": 472, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:43", "sha256": "419730046899e096ce1da9f3a67fa5064872ac9296571bfaf850a45d7ce85515", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/actions/getting-started/returning-files", "titulek": "Sending and returning files with GPT Actions", "h1": "Sending and returning files with GPT Actions", "popis": "Learn how to send and return files using GPT Actions in the OpenAI API.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/sending-files", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/sending-files", "og:site_name": "OpenAI Developers", "og:title": "Sending and returning files with GPT Actions", "og:description": "Learn how to send and return files using GPT Actions in the OpenAI API.", "og:image": "https://developers.openai.com/og/api/docs/actions/sending-files.png", "og:image:alt": "Sending and returning files with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Sending files"}, {"uroven": 3, "text": "OpenAPI Example"}, {"uroven": 2, "text": "Returning files"}, {"uroven": 3, "text": "Inline option"}, {"uroven": 3, "text": "URL option"}], "markdown": "## Sending files\n\nPOST requests can include up to ten files (including DALL-E generated images) from the conversation. They will be sent as URLs which are valid for five minutes.\n\nFor files to be part of your POST request, the parameter must be named `openaiFileIdRefs` and the description should explain to the model the type and quantity of the files which your API is expecting.\n\nThe `openaiFileIdRefs` parameter will be populated with an array of JSON objects. Each object contains:\n\n- `name` The name of the file. This will be an auto generated name when created by DALL-E.\n- `id` A stable identifier for the file.\n- `mime_type` The mime type of the file. For user uploaded files this is based on file extension.\n- `download_link` The URL to fetch the file which is valid for five minutes.\n\nHere’s an example of an `openaiFileIdRefs` array with two elements:\n\n```\n1234567891011121314[ { \"name\": \"dalle-Lh2tg7WuosbyR9hk\", \"id\": \"file-XFlOqJYTPBPwMZE3IopCBv1Z\", \"mime_type\": \"image/webp\", \"download_link\": \"https://files.oaiusercontent.com/file-XFlOqJYTPBPwMZE3IopCBv1Z?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D31536000%2C%20immutable&rscd=attachment%3B%20filename%3Da580bae6-ea30-478e-a3e2-1f6c06c3e02f.webp&sig=ZPWol5eXACxU1O9azLwRNgKVidCe%2BwgMOc/TdrPGYII%3D\" }, { \"name\": \"2023 Benefits Booklet.pdf\", \"id\": \"file-s5nX7o4junn2ig0J84r8Q0Ew\", \"mime_type\": \"application/pdf\", \"download_link\": \"https://files.oaiusercontent.com/file-s5nX7o4junn2ig0J84r8Q0Ew?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D299%2C%20immutable&rscd=attachment%3B%20filename%3D2023%2520Benefits%2520Booklet.pdf&sig=Ivhviy%2BrgoyUjxZ%2BingpwtUwsA4%2BWaRfXy8ru9AfcII%3D\" } ]\n```\n\nActions can include files uploaded by the user, images generated by DALL-E, and files created by Code Interpreter.\n\n### OpenAPI Example\n\n```\n12345678910111213141516/createWidget: post: operationId: createWidget summary: Creates a widget based on an image. description: Uploads a file reference using its file id. This file should be an image created by DALL·E or uploaded by the user. JPG, WEBP, and PNG are supported for widget creation. requestBody: required: true content: application/json: schema: type: object properties: openaiFileIdRefs: type: array items: type: string\n```\n\nWhile this schema shows `openaiFileIdRefs` as being an array of type `string`, at runtime this will be populated with an array of JSON objects as previously shown.\n\n## Returning files\n\nRequests may return up to 10 files. Each file may be up to 10 MB and cannot be an image or video.\n\nThese files will become part of the conversation similarly to if a user uploaded them, meaning they may be made available to code interpreter, file search, and sent as part of subsequent action invocations. In the web app users will see that the files have been returned and can download them.\n\nTo return files, the body of the response must contain an `openaiFileResponse` parameter. This parameter must always be an array and must be populated in one of two ways.\n\n### Inline option\n\nEach element of the array is a JSON object which contains:\n\n- `name` The name of the file. This will be visible to the user.\n- `mime_type` The MIME type of the file. This is used to determine eligibility and which features have access to the file.\n- `content` The base64 encoded contents of the file.\n\nHere’s an example of an openaiFileResponse array with two elements:\n\n```\n123456789101112[ { \"name\": \"example_document.pdf\", \"mime_type\": \"application/pdf\", \"content\": \"JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+CnN0cmVhbQpHhD93PQplbmRzdHJlYW0KZW5kb2JqCg==\" }, { \"name\": \"sample_spreadsheet.csv\", \"mime_type\": \"text/csv\", \"content\": \"iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" } ]\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526272829303132333435/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: \"200\": description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: object properties: name: type: string description: The name of the file. mime_type: type: string description: The MIME type of the file. content: type: string format: byte description: The content of the file in base64 encoding.\n```\n\n### URL option\n\nEach element of the array is a URL referencing a file to be downloaded. The headers `Content-Disposition` and `Content-Type` must be set such that a file name and MIME type can be determined. The name of the file will be visible to the user. The MIME type of the file determines eligibility and which features have access to the file.\n\nThere is a 10 second timeout for fetching each file.\n\nHere’s an example of an `openaiFileResponse` array with two elements:\n\n```\n1234[ \"https://example.com/f/dca89f18-16d4-4a65-8ea2-ededced01646\", \"https://example.com/f/01fad6b0-635b-4803-a583-0f678b2e6153\" ]\n```\n\nHere’s an example of the required headers for each URL:\n\n```\nContent-Type: application/pdf Content-Disposition: attachment; filename=\"example_document.pdf\"\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: '200': description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: string format: uri description: URLs to fetch the files.\n```", "znaku_textu": 5910, "slov": 772, "odkazu": 472, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/actions/getting-started/including-files", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:38", "sha256": "419730046899e096ce1da9f3a67fa5064872ac9296571bfaf850a45d7ce85515", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/actions/getting-started/sending-files", "titulek": "Sending and returning files with GPT Actions", "h1": "Sending and returning files with GPT Actions", "popis": "Learn how to send and return files using GPT Actions in the OpenAI API.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/sending-files", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/sending-files", "og:site_name": "OpenAI Developers", "og:title": "Sending and returning files with GPT Actions", "og:description": "Learn how to send and return files using GPT Actions in the OpenAI API.", "og:image": "https://developers.openai.com/og/api/docs/actions/sending-files.png", "og:image:alt": "Sending and returning files with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Sending files"}, {"uroven": 3, "text": "OpenAPI Example"}, {"uroven": 2, "text": "Returning files"}, {"uroven": 3, "text": "Inline option"}, {"uroven": 3, "text": "URL option"}], "markdown": "## Sending files\n\nPOST requests can include up to ten files (including DALL-E generated images) from the conversation. They will be sent as URLs which are valid for five minutes.\n\nFor files to be part of your POST request, the parameter must be named `openaiFileIdRefs` and the description should explain to the model the type and quantity of the files which your API is expecting.\n\nThe `openaiFileIdRefs` parameter will be populated with an array of JSON objects. Each object contains:\n\n- `name` The name of the file. This will be an auto generated name when created by DALL-E.\n- `id` A stable identifier for the file.\n- `mime_type` The mime type of the file. For user uploaded files this is based on file extension.\n- `download_link` The URL to fetch the file which is valid for five minutes.\n\nHere’s an example of an `openaiFileIdRefs` array with two elements:\n\n```\n1234567891011121314[ { \"name\": \"dalle-Lh2tg7WuosbyR9hk\", \"id\": \"file-XFlOqJYTPBPwMZE3IopCBv1Z\", \"mime_type\": \"image/webp\", \"download_link\": \"https://files.oaiusercontent.com/file-XFlOqJYTPBPwMZE3IopCBv1Z?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D31536000%2C%20immutable&rscd=attachment%3B%20filename%3Da580bae6-ea30-478e-a3e2-1f6c06c3e02f.webp&sig=ZPWol5eXACxU1O9azLwRNgKVidCe%2BwgMOc/TdrPGYII%3D\" }, { \"name\": \"2023 Benefits Booklet.pdf\", \"id\": \"file-s5nX7o4junn2ig0J84r8Q0Ew\", \"mime_type\": \"application/pdf\", \"download_link\": \"https://files.oaiusercontent.com/file-s5nX7o4junn2ig0J84r8Q0Ew?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D299%2C%20immutable&rscd=attachment%3B%20filename%3D2023%2520Benefits%2520Booklet.pdf&sig=Ivhviy%2BrgoyUjxZ%2BingpwtUwsA4%2BWaRfXy8ru9AfcII%3D\" } ]\n```\n\nActions can include files uploaded by the user, images generated by DALL-E, and files created by Code Interpreter.\n\n### OpenAPI Example\n\n```\n12345678910111213141516/createWidget: post: operationId: createWidget summary: Creates a widget based on an image. description: Uploads a file reference using its file id. This file should be an image created by DALL·E or uploaded by the user. JPG, WEBP, and PNG are supported for widget creation. requestBody: required: true content: application/json: schema: type: object properties: openaiFileIdRefs: type: array items: type: string\n```\n\nWhile this schema shows `openaiFileIdRefs` as being an array of type `string`, at runtime this will be populated with an array of JSON objects as previously shown.\n\n## Returning files\n\nRequests may return up to 10 files. Each file may be up to 10 MB and cannot be an image or video.\n\nThese files will become part of the conversation similarly to if a user uploaded them, meaning they may be made available to code interpreter, file search, and sent as part of subsequent action invocations. In the web app users will see that the files have been returned and can download them.\n\nTo return files, the body of the response must contain an `openaiFileResponse` parameter. This parameter must always be an array and must be populated in one of two ways.\n\n### Inline option\n\nEach element of the array is a JSON object which contains:\n\n- `name` The name of the file. This will be visible to the user.\n- `mime_type` The MIME type of the file. This is used to determine eligibility and which features have access to the file.\n- `content` The base64 encoded contents of the file.\n\nHere’s an example of an openaiFileResponse array with two elements:\n\n```\n123456789101112[ { \"name\": \"example_document.pdf\", \"mime_type\": \"application/pdf\", \"content\": \"JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+CnN0cmVhbQpHhD93PQplbmRzdHJlYW0KZW5kb2JqCg==\" }, { \"name\": \"sample_spreadsheet.csv\", \"mime_type\": \"text/csv\", \"content\": \"iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" } ]\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526272829303132333435/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: \"200\": description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: object properties: name: type: string description: The name of the file. mime_type: type: string description: The MIME type of the file. content: type: string format: byte description: The content of the file in base64 encoding.\n```\n\n### URL option\n\nEach element of the array is a URL referencing a file to be downloaded. The headers `Content-Disposition` and `Content-Type` must be set such that a file name and MIME type can be determined. The name of the file will be visible to the user. The MIME type of the file determines eligibility and which features have access to the file.\n\nThere is a 10 second timeout for fetching each file.\n\nHere’s an example of an `openaiFileResponse` array with two elements:\n\n```\n1234[ \"https://example.com/f/dca89f18-16d4-4a65-8ea2-ededced01646\", \"https://example.com/f/01fad6b0-635b-4803-a583-0f678b2e6153\" ]\n```\n\nHere’s an example of the required headers for each URL:\n\n```\nContent-Type: application/pdf Content-Disposition: attachment; filename=\"example_document.pdf\"\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: '200': description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: string format: uri description: URLs to fetch the files.\n```", "znaku_textu": 5910, "slov": 772, "odkazu": 472, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/actions/getting-started/including-files", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:40", "sha256": "419730046899e096ce1da9f3a67fa5064872ac9296571bfaf850a45d7ce85515", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/actions/introduction", "titulek": "GPT Actions", "h1": "GPT Actions", "popis": "Learn about GPT Actions for customizing ChatGPT and interacting with external applications via APIs.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/introduction", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/introduction", "og:site_name": "OpenAI Developers", "og:title": "GPT Actions", "og:description": "Learn about GPT Actions for customizing ChatGPT and interacting with external applications via APIs.", "og:image": "https://developers.openai.com/og/api/docs/actions/introduction.png", "og:image:alt": "GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "How GPT Actions work"}, {"uroven": 2, "text": "The Power of GPT Actions"}, {"uroven": 2, "text": "Simplified example"}, {"uroven": 2, "text": "Get started on building"}, {"uroven": 2, "text": "Additional information"}], "markdown": "GPT Actions are stored in [Custom GPTs](https://openai.com/blog/introducing-gpts), which enable users to customize ChatGPT for specific use cases by providing instructions, attaching documents as knowledge, and connecting to 3rd party services.\n\nGPT Actions empower ChatGPT users to interact with external applications via RESTful APIs calls outside of ChatGPT simply by using natural language. They convert natural language text into the json schema required for an API call. GPT Actions are usually either used to do [data retrieval](/api/docs/actions/data-retrieval) to ChatGPT (e.g. query a Data Warehouse) or take action in another application (e.g. file a JIRA ticket).\n\n## How GPT Actions work\n\nAt their core, GPT Actions leverage [Function Calling](/api/docs/guides/function-calling) to execute API calls.\n\nSimilar to ChatGPT’s Data Analysis capability (which generates Python code and then executes it), they leverage Function Calling to (1) decide which API call is relevant to the user’s question and (2) generate the json input necessary for the API call. Then finally, the GPT Action executes the API call using that json input.\n\nDevelopers can even specify the authentication mechanism of an action, and the Custom GPT will execute the API call using the third party app’s authentication. GPT Actions obfuscates the complexity of the API call to the end user: they simply ask a question in natural language, and ChatGPT provides the output in natural language as well.\n\n## The Power of GPT Actions\n\nAPIs allow for **interoperability** to enable your organization to access other applications. However, enabling users to access the right information from 3rd-party APIs can require significant overhead from developers.\n\nGPT Actions provide a viable alternative: developers can now simply describe the schema of an API call, configure authentication, and add in some instructions to the GPT, and ChatGPT provides the bridge between the user’s natural language questions and the API layer.\n\n## Simplified example\n\nThe [getting started guide](/api/docs/actions/getting-started) walks through an example using two API calls from [weather.gov](weather.gov) to generate a forecast:\n\n- /points/{latitude},{longitude} inputs lat-long coordinates and outputs forecast office (wfo) and x-y coordinates\n- /gridpoints/{office}/{gridX},{gridY}/forecast inputs wfo,x,y coordinates and outputs a forecast\n\nOnce a developer has encoded the json schema required to populate both of those API calls in a GPT Action, a user can simply ask “What I should pack on a trip to Washington DC this weekend?” The GPT Action will then figure out the lat-long of that location, execute both API calls in order, and respond with a packing list based on the weekend forecast it receives back.\n\nIn this example, GPT Actions will supply api.weather.gov with two API inputs:\n\n/points API call:\n\n```\n1234{ \"latitude\": 38.9072, \"longitude\": -77.0369 }\n```\n\n/forecast API call:\n\n```\n12345{ \"wfo\": \"LWX\", \"x\": 97, \"y\": 71 }\n```\n\n## Get started on building\n\nCheck out the [getting started guide](/api/docs/actions/getting-started) for a deeper dive on this weather example and our [actions library](/api/docs/actions/actions-library) for pre-built example GPT Actions of the most common 3rd party apps.\n\n## Additional information\n\n- Familiarize yourself with our [GPT policies](https://openai.com/policies/usage-policies#:~:text=or%20educational%20purposes.-,Building%20with%20ChatGPT,-Shared%20GPTs%20allow)\n- Check out the [GPT data privacy FAQs](https://help.openai.com/en/articles/8554402-gpts-data-privacy-faqs)\n- Find answers to [common GPT questions](https://help.openai.com/en/articles/8554407-gpts-faq)", "znaku_textu": 3637, "slov": 513, "odkazu": 480, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 22:40:18", "sha256": "4d448e5bbccafff51207ab69062da19825aaa2c9b824e82a6b6a3647910fa999", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://openai.com/blog/introducing-gpts", "https://openai.com/policies/usage-policies", "https://help.openai.com/en/articles/8554402-gpts-data-privacy-faqs", "https://help.openai.com/en/articles/8554407-gpts-faq"]} {"url": "https://developers.openai.com/api/docs/actions/introduction/", "titulek": "GPT Actions", "h1": "GPT Actions", "popis": "Learn about GPT Actions for customizing ChatGPT and interacting with external applications via APIs.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/introduction", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/introduction", "og:site_name": "OpenAI Developers", "og:title": "GPT Actions", "og:description": "Learn about GPT Actions for customizing ChatGPT and interacting with external applications via APIs.", "og:image": "https://developers.openai.com/og/api/docs/actions/introduction.png", "og:image:alt": "GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "How GPT Actions work"}, {"uroven": 2, "text": "The Power of GPT Actions"}, {"uroven": 2, "text": "Simplified example"}, {"uroven": 2, "text": "Get started on building"}, {"uroven": 2, "text": "Additional information"}], "markdown": "GPT Actions are stored in [Custom GPTs](https://openai.com/blog/introducing-gpts), which enable users to customize ChatGPT for specific use cases by providing instructions, attaching documents as knowledge, and connecting to 3rd party services.\n\nGPT Actions empower ChatGPT users to interact with external applications via RESTful APIs calls outside of ChatGPT simply by using natural language. They convert natural language text into the json schema required for an API call. GPT Actions are usually either used to do [data retrieval](/api/docs/actions/data-retrieval) to ChatGPT (e.g. query a Data Warehouse) or take action in another application (e.g. file a JIRA ticket).\n\n## How GPT Actions work\n\nAt their core, GPT Actions leverage [Function Calling](/api/docs/guides/function-calling) to execute API calls.\n\nSimilar to ChatGPT’s Data Analysis capability (which generates Python code and then executes it), they leverage Function Calling to (1) decide which API call is relevant to the user’s question and (2) generate the json input necessary for the API call. Then finally, the GPT Action executes the API call using that json input.\n\nDevelopers can even specify the authentication mechanism of an action, and the Custom GPT will execute the API call using the third party app’s authentication. GPT Actions obfuscates the complexity of the API call to the end user: they simply ask a question in natural language, and ChatGPT provides the output in natural language as well.\n\n## The Power of GPT Actions\n\nAPIs allow for **interoperability** to enable your organization to access other applications. However, enabling users to access the right information from 3rd-party APIs can require significant overhead from developers.\n\nGPT Actions provide a viable alternative: developers can now simply describe the schema of an API call, configure authentication, and add in some instructions to the GPT, and ChatGPT provides the bridge between the user’s natural language questions and the API layer.\n\n## Simplified example\n\nThe [getting started guide](/api/docs/actions/getting-started) walks through an example using two API calls from [weather.gov](weather.gov) to generate a forecast:\n\n- /points/{latitude},{longitude} inputs lat-long coordinates and outputs forecast office (wfo) and x-y coordinates\n- /gridpoints/{office}/{gridX},{gridY}/forecast inputs wfo,x,y coordinates and outputs a forecast\n\nOnce a developer has encoded the json schema required to populate both of those API calls in a GPT Action, a user can simply ask “What I should pack on a trip to Washington DC this weekend?” The GPT Action will then figure out the lat-long of that location, execute both API calls in order, and respond with a packing list based on the weekend forecast it receives back.\n\nIn this example, GPT Actions will supply api.weather.gov with two API inputs:\n\n/points API call:\n\n```\n1234{ \"latitude\": 38.9072, \"longitude\": -77.0369 }\n```\n\n/forecast API call:\n\n```\n12345{ \"wfo\": \"LWX\", \"x\": 97, \"y\": 71 }\n```\n\n## Get started on building\n\nCheck out the [getting started guide](/api/docs/actions/getting-started) for a deeper dive on this weather example and our [actions library](/api/docs/actions/actions-library) for pre-built example GPT Actions of the most common 3rd party apps.\n\n## Additional information\n\n- Familiarize yourself with our [GPT policies](https://openai.com/policies/usage-policies#:~:text=or%20educational%20purposes.-,Building%20with%20ChatGPT,-Shared%20GPTs%20allow)\n- Check out the [GPT data privacy FAQs](https://help.openai.com/en/articles/8554402-gpts-data-privacy-faqs)\n- Find answers to [common GPT questions](https://help.openai.com/en/articles/8554407-gpts-faq)", "znaku_textu": 3637, "slov": 513, "odkazu": 480, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:31", "sha256": "6cf80f274329979ab1bc9363150822fe7a1abc0a435a040a0dc62ad717046150", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs", "https://openai.com/blog/introducing-gpts", "https://openai.com/policies/usage-policies", "https://help.openai.com/en/articles/8554402-gpts-data-privacy-faqs", "https://help.openai.com/en/articles/8554407-gpts-faq"]} {"url": "https://developers.openai.com/api/docs/actions/production/", "titulek": "Production notes on GPT Actions", "h1": "Production notes on GPT Actions", "popis": "Guidelines for deploying GPT Actions in a production environment, including rate limits, timeouts, and security measures.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/production", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/production", "og:site_name": "OpenAI Developers", "og:title": "Production notes on GPT Actions", "og:description": "Guidelines for deploying GPT Actions in a production environment, including rate limits, timeouts, and security measures.", "og:image": "https://developers.openai.com/og/api/docs/actions/production.png", "og:image:alt": "Production notes on GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Rate limits"}, {"uroven": 2, "text": "Timeouts"}, {"uroven": 2, "text": "Use TLS and HTTPS"}, {"uroven": 2, "text": "IP egress ranges"}, {"uroven": 2, "text": "Multiple authentication schemas"}, {"uroven": 2, "text": "Open API specification limits"}, {"uroven": 2, "text": "Additional limitations"}, {"uroven": 2, "text": "Consequential flag"}, {"uroven": 2, "text": "Best practices on feeding examples"}, {"uroven": 2, "text": "How GPT Action data is used"}], "markdown": "## Rate limits\n\nConsider implementing rate limiting on the API endpoints you expose. ChatGPT will respect 429 response codes and dynamically back off from sending requests to your action after receiving a certain number of 429’s or 500’s in a short period of time.\n\n## Timeouts\n\nWhen making API calls during the actions experience, timeouts take place if the following thresholds are exceeded:\n\n- 45 seconds round trip for API calls\n\n## Use TLS and HTTPS\n\nAll traffic to your action must use TLS 1.2 or later on port 443 with a valid public certificate.\n\n## IP egress ranges\n\nChatGPT will call your action from one of the [published IP ranges](/api/docs/guides/ip-addresses). You may wish to explicitly allowlist these IP addresses.\n\n## Multiple authentication schemas\n\nWhen defining an action, you can mix a single authentication type (OAuth or API key) along with endpoints that do not require authentication.\n\nYou can learn more about action authentication on our [actions authentication page](/api/docs/actions/authentication).\n\n## Open API specification limits\n\nKeep in mind the following limits in your OpenAPI specification, which are subject to change:\n\n- 300 characters max for each API endpoint description/summary field in API specification\n- 700 characters max for each API parameter description field in API specification\n\n## Additional limitations\n\nThere are a few limitations to be aware of when building with actions:\n\n- Custom headers are not supported\n- With the exception of Google, Microsoft and Adobe OAuth domains, all domains used in an OAuth flow must be the same as the domain used for the primary endpoints\n- Request and response payloads must be less than 100,000 characters each\n- Requests timeout after 45 seconds\n- Requests and responses can only contain text (no images or video)\n\n## Consequential flag\n\nIn the OpenAPI specification, you can now set certain endpoints as “consequential” as shown below:\n\n```\n12345678910paths: /todo: get: operationId: getTODOs description: Fetches items in a TODO list from the API. security: [] post: operationId: updateTODOs description: Mutates the TODO list. x-openai-isConsequential: true\n```\n\nA good example of a consequential action is booking a hotel room and paying for it on behalf of a user.\n\n- If the `x-openai-isConsequential` field is `true` , ChatGPT treats the operation as “must always prompt the user for confirmation before running” and don’t show an “always allow” button (both are features of GPTs designed to give builders and users more control over actions).\n- If the `x-openai-isConsequential` field is `false` , ChatGPT shows the “always allow button”.\n- If the field isn’t present, ChatGPT defaults all GET operations to `false` and all other operations to `true`\n\n## Best practices on feeding examples\n\nHere are some best practices to follow when writing your GPT instructions and descriptions in your schema, as well as when designing your API responses:\n\n1. Your descriptions should not encourage the GPT to use the action when the user hasn’t asked for your action’s particular category of service. *Bad example*: Whenever the user mentions any type of task, ask if they would like to use the TODO action to add something to their todo list. *Good example*: The TODO list can add, remove and view the user’s TODOs.\n2. Your descriptions should not prescribe specific triggers for the GPT to use the action. ChatGPT is designed to use your action automatically when appropriate. *Bad example*: When the user mentions a task, respond with “Would you like me to add this to your TODO list? Say ‘yes’ to continue.” *Good example*: [no instructions needed for this]\n3. Action responses from an API should return raw data instead of natural language responses unless it’s necessary. The GPT will provide its own natural language response using the returned data. *Bad example*: I was able to find your todo list! You have 2 todos: get groceries and walk the dog. I can add more todos if you’d like! *Good example*: { “todos”: [ “get groceries”, “walk the dog” ] }\n\n## How GPT Action data is used\n\nGPT Actions connect ChatGPT to external apps. If a user interacts with a GPT’s custom action, ChatGPT may send parts of their conversation to the action’s endpoint.\n\nIf you have questions or run into additional limitations, you can join the discussion on the [OpenAI developer forum](https://community.openai.com).", "znaku_textu": 4318, "slov": 698, "odkazu": 474, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:32", "sha256": "cc4e0ef09a7e3fa6d5795fc1e98d0e912b76ad66ae28e41d3d228d15df1f6e82", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/actions/sending-files/", "titulek": "Sending and returning files with GPT Actions", "h1": "Sending and returning files with GPT Actions", "popis": "Learn how to send and return files using GPT Actions in the OpenAI API.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/actions/sending-files", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/actions/sending-files", "og:site_name": "OpenAI Developers", "og:title": "Sending and returning files with GPT Actions", "og:description": "Learn how to send and return files using GPT Actions in the OpenAI API.", "og:image": "https://developers.openai.com/og/api/docs/actions/sending-files.png", "og:image:alt": "Sending and returning files with GPT Actions", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Sending files"}, {"uroven": 3, "text": "OpenAPI Example"}, {"uroven": 2, "text": "Returning files"}, {"uroven": 3, "text": "Inline option"}, {"uroven": 3, "text": "URL option"}], "markdown": "## Sending files\n\nPOST requests can include up to ten files (including DALL-E generated images) from the conversation. They will be sent as URLs which are valid for five minutes.\n\nFor files to be part of your POST request, the parameter must be named `openaiFileIdRefs` and the description should explain to the model the type and quantity of the files which your API is expecting.\n\nThe `openaiFileIdRefs` parameter will be populated with an array of JSON objects. Each object contains:\n\n- `name` The name of the file. This will be an auto generated name when created by DALL-E.\n- `id` A stable identifier for the file.\n- `mime_type` The mime type of the file. For user uploaded files this is based on file extension.\n- `download_link` The URL to fetch the file which is valid for five minutes.\n\nHere’s an example of an `openaiFileIdRefs` array with two elements:\n\n```\n1234567891011121314[ { \"name\": \"dalle-Lh2tg7WuosbyR9hk\", \"id\": \"file-XFlOqJYTPBPwMZE3IopCBv1Z\", \"mime_type\": \"image/webp\", \"download_link\": \"https://files.oaiusercontent.com/file-XFlOqJYTPBPwMZE3IopCBv1Z?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D31536000%2C%20immutable&rscd=attachment%3B%20filename%3Da580bae6-ea30-478e-a3e2-1f6c06c3e02f.webp&sig=ZPWol5eXACxU1O9azLwRNgKVidCe%2BwgMOc/TdrPGYII%3D\" }, { \"name\": \"2023 Benefits Booklet.pdf\", \"id\": \"file-s5nX7o4junn2ig0J84r8Q0Ew\", \"mime_type\": \"application/pdf\", \"download_link\": \"https://files.oaiusercontent.com/file-s5nX7o4junn2ig0J84r8Q0Ew?se=2024-03-11T20%3A29%3A52Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D299%2C%20immutable&rscd=attachment%3B%20filename%3D2023%2520Benefits%2520Booklet.pdf&sig=Ivhviy%2BrgoyUjxZ%2BingpwtUwsA4%2BWaRfXy8ru9AfcII%3D\" } ]\n```\n\nActions can include files uploaded by the user, images generated by DALL-E, and files created by Code Interpreter.\n\n### OpenAPI Example\n\n```\n12345678910111213141516/createWidget: post: operationId: createWidget summary: Creates a widget based on an image. description: Uploads a file reference using its file id. This file should be an image created by DALL·E or uploaded by the user. JPG, WEBP, and PNG are supported for widget creation. requestBody: required: true content: application/json: schema: type: object properties: openaiFileIdRefs: type: array items: type: string\n```\n\nWhile this schema shows `openaiFileIdRefs` as being an array of type `string`, at runtime this will be populated with an array of JSON objects as previously shown.\n\n## Returning files\n\nRequests may return up to 10 files. Each file may be up to 10 MB and cannot be an image or video.\n\nThese files will become part of the conversation similarly to if a user uploaded them, meaning they may be made available to code interpreter, file search, and sent as part of subsequent action invocations. In the web app users will see that the files have been returned and can download them.\n\nTo return files, the body of the response must contain an `openaiFileResponse` parameter. This parameter must always be an array and must be populated in one of two ways.\n\n### Inline option\n\nEach element of the array is a JSON object which contains:\n\n- `name` The name of the file. This will be visible to the user.\n- `mime_type` The MIME type of the file. This is used to determine eligibility and which features have access to the file.\n- `content` The base64 encoded contents of the file.\n\nHere’s an example of an openaiFileResponse array with two elements:\n\n```\n123456789101112[ { \"name\": \"example_document.pdf\", \"mime_type\": \"application/pdf\", \"content\": \"JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+CnN0cmVhbQpHhD93PQplbmRzdHJlYW0KZW5kb2JqCg==\" }, { \"name\": \"sample_spreadsheet.csv\", \"mime_type\": \"text/csv\", \"content\": \"iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" } ]\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526272829303132333435/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: \"200\": description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: object properties: name: type: string description: The name of the file. mime_type: type: string description: The MIME type of the file. content: type: string format: byte description: The content of the file in base64 encoding.\n```\n\n### URL option\n\nEach element of the array is a URL referencing a file to be downloaded. The headers `Content-Disposition` and `Content-Type` must be set such that a file name and MIME type can be determined. The name of the file will be visible to the user. The MIME type of the file determines eligibility and which features have access to the file.\n\nThere is a 10 second timeout for fetching each file.\n\nHere’s an example of an `openaiFileResponse` array with two elements:\n\n```\n1234[ \"https://example.com/f/dca89f18-16d4-4a65-8ea2-ededced01646\", \"https://example.com/f/01fad6b0-635b-4803-a583-0f678b2e6153\" ]\n```\n\nHere’s an example of the required headers for each URL:\n\n```\nContent-Type: application/pdf Content-Disposition: attachment; filename=\"example_document.pdf\"\n```\n\nOpenAPI example\n\n```\n1234567891011121314151617181920212223242526/papers: get: operationId: findPapers summary: Retrieve PDFs of relevant academic papers. description: Provided an academic topic, up to five relevant papers will be returned as PDFs. parameters: - in: query name: topic required: true schema: type: string description: The topic the papers should be about. responses: '200': description: Zero to five academic paper PDFs content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: string format: uri description: URLs to fetch the files.\n```", "znaku_textu": 5910, "slov": 772, "odkazu": 472, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 20:43:33", "sha256": "e75362d2418045d8f4dc2882601bd7f4a5ce3c8aeb90d81cd42369e1f3568a6a", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/api-reference", "titulek": "API Overview | OpenAI API Reference", "h1": "API Overview", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/overview/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "API Overview", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/overview/", "og:locale": "en", "og:site_name": "OpenAI API Reference", "og:image": "https://developers.openai.com/og/api/reference/overview.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 1, "text": "API Overview"}, {"uroven": 2, "text": "Start here"}, {"uroven": 2, "text": "Authentication"}, {"uroven": 2, "text": "Request headers"}, {"uroven": 2, "text": "Debugging requests"}, {"uroven": 3, "text": "Supplying your own request ID with X-Client-Request-Id"}, {"uroven": 2, "text": "Backwards compatibility"}], "markdown": "# API Overview\n\nUse this reference to look up OpenAI API endpoints, request and response\nschemas, streaming events, client library methods, and shared behavior such as\nauthentication, errors, rate limits, and request IDs.\n\n## Start here\n\nSection titled “Start here”\n\n1. Choose the API surface for your application:\n - [Responses](/api/reference/responses/overview) for direct model requests, tool use, audio, image, and text inputs, and stateful interactions.\n - [Realtime API](/api/docs/guides/realtime) for low-latency voice or audio sessions over WebRTC, WebSocket, or SIP. Use the [client events](/api/reference/resources/realtime/client-events) and [server events](/api/reference/resources/realtime/server-events) references while building sessions.\n - [Administration](/api/reference/administration/overview) for organization workflows such as users, invites, projects, API keys, and audit logs.\n2. Create credentials. Use a standard [API key](https://platform.openai.com/settings/organization/api-keys) for application requests, an [Admin API key](https://platform.openai.com/settings/organization/admin-keys) for Administration endpoints, or [workload identity federation](/api/docs/guides/workload-identity-federation) for short-lived access tokens.\n3. Install an official client library from the [libraries page](/api/docs/libraries) , or call the HTTP API directly from any environment that supports HTTP requests.\n4. Make a first request with the [developer quickstart](/api/docs/quickstart) or go straight to the [Responses create reference](/api/reference/resources/responses/methods/create) .\n5. Before production, review [error codes](/api/docs/guides/error-codes) , [rate limits](/api/docs/guides/rate-limits) , and request ID logging below.\n\n## Authentication\n\nSection titled “Authentication”\n\nThe OpenAI API accepts bearer credentials from API keys or from short-lived access tokens created with [workload identity federation](/api/docs/guides/workload-identity-federation).\n\n**Remember that your API key is a secret.** Don’t share it with others or expose it in any client-side code such as browsers or apps. Load API keys from an environment variable or key management service on the server.\n\nRevocations of an API key take effect within a few seconds. Most updates that\naffect authentication results of an API key propagate within 15 minutes, but\ncan potentially take longer.\n\nProvide API credentials with [HTTP Bearer authentication](https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/).\n\n```\nAuthorization: Bearer OPENAI_API_KEY_OR_ACCESS_TOKEN\n```\n\nIf you belong to more than one organization or access projects through a legacy user API key, pass a header to specify which organization and project to use for an API request:\n\n```\ncurl https://api.openai.com/v1/models \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"OpenAI-Organization: $ORGANIZATION_ID\" \\ -H \"OpenAI-Project: $PROJECT_ID\"\n```\n\nUsage from these API requests counts as usage for the specified organization and project. Find organization and project IDs in your [dashboard settings](https://platform.openai.com/settings/organization/general).\n\n## Request headers\n\nSection titled “Request headers”\n\nFor reliable behavior across API paths and HTTP versions, keep the total size\nof an API request’s headers under 64 KiB. This budget includes the names and\nvalues of all headers, including common headers such as `Authorization`,\n`Content-Type`, and `User-Agent`, as well as any custom headers.\n\nTo leave room for required headers and headers added by intermediaries, keep\nany individual custom header value and the total size of all custom header\nvalues at 60 KiB or less. Requests with larger headers may fail before they\nreach the API, so you may not receive a response or an `x-request-id`.\n\n## Debugging requests\n\nSection titled “Debugging requests”\n\n[Error codes](/api/docs/guides/error-codes) describe failures returned from API responses. Inspect HTTP response headers for the unique ID of a request and rate limit details. Common response headers include:\n\n**API meta information**\n\n- `openai-organization` : The [organization](/api/docs/guides/production-best-practices#setting-up-your-organization) associated with the request\n- `openai-processing-ms` : Time taken processing your API request\n- `openai-version` : REST API version used for this request (currently `2020-10-01` )\n- `x-request-id` : Unique identifier for this API request (used in troubleshooting)\n\n**[Rate limiting information](/api/docs/guides/rate-limits)**\n\n- `x-ratelimit-limit-requests`\n- `x-ratelimit-limit-tokens`\n- `x-ratelimit-remaining-requests`\n- `x-ratelimit-remaining-tokens`\n- `x-ratelimit-reset-requests`\n- `x-ratelimit-reset-tokens`\n- `x-ratelimit-limit-project-tokens`\n- `x-ratelimit-remaining-project-tokens`\n- `x-ratelimit-reset-project-tokens`\n\nProject-token headers may be present when a project-scoped token limit applies.\n\n**OpenAI recommends logging request IDs in production deployments** for more efficient troubleshooting with the [support team](https://help.openai.com/en/), should the need arise. Official [client libraries](/api/docs/libraries) provide a property on top-level response objects containing the value of the `x-request-id` header.\n\n### Supplying your own request ID with `X-Client-Request-Id`\n\nSection titled “Supplying your own request ID with X-Client-Request-Id”\n\nAlong with the server-generated `x-request-id`, you can supply your own unique identifier for each request via the `X-Client-Request-Id` request header. This header isn’t added automatically; you must explicitly set it on the request.\n\nWhen you include `X-Client-Request-Id`:\n\n- You control the ID format (for example, a UUID or your internal trace ID), but it must contain only ASCII characters and be no more than 512 characters long; otherwise, the request will fail with a 400 error. Make this value unique per request.\n- OpenAI logs this value internally for supported endpoints, including chat/completions, embeddings, responses, and more.\n- In cases like timeouts or network issues when you can’t get the `X-Request-Id` response header, you can share the `X-Client-Request-Id` value with the support team to look up whether OpenAI received the request and when.\n\n**Example:**\n\n```\ncurl https://api.openai.com/v1/chat/completions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"X-Client-Request-Id: 123e4567-e89b-12d3-a456-426614174000\"\n```\n\n## Backwards compatibility\n\nSection titled “Backwards compatibility”\n\nOpenAI provides stability to API users by avoiding breaking changes in major API versions whenever reasonably possible. This includes:\n\n- The REST API (currently `v1` )\n- First-party [client libraries](/api/docs/libraries) (released libraries adhere to [semantic versioning](https://semver.org/) )\n- [Model](/api/docs/models) families (like `gpt-4o` or `o4-mini` )\n\n**Model prompting behavior between snapshots is subject to change**.\nModel outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run [evals](/api/docs/guides/evals) for your applications.\n\n**Backwards-compatible API changes**:\n\n- Adding new resources (URLs) to the REST API and client libraries\n- Adding new optional API parameters\n- Adding new properties to JSON response objects or event data\n- Changing the order of properties in a JSON response object\n- Changing the length or format of opaque strings, like resource identifiers\n- Adding new event types in streaming APIs\n\nSee the [changelog](/api/docs/changelog) for a list of backwards-compatible changes and rare breaking changes.", "znaku_textu": 7584, "slov": 1031, "odkazu": 390, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:49", "sha256": "5c877cb85fb6b9ce2017b7045cd56125a1316ccb8aa9cec8e3274a7eaf51d57c", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://platform.openai.com/settings/organization/api-keys", "https://platform.openai.com/settings/organization/admin-keys", "https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/", "https://platform.openai.com/settings/organization/general", "https://help.openai.com/en/", "https://semver.org/"]} {"url": "https://developers.openai.com/api/docs/api-reference/", "titulek": "API Overview | OpenAI API Reference", "h1": "API Overview", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/overview/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "API Overview", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/overview/", "og:locale": "en", "og:site_name": "OpenAI API Reference", "og:image": "https://developers.openai.com/og/api/reference/overview.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 1, "text": "API Overview"}, {"uroven": 2, "text": "Start here"}, {"uroven": 2, "text": "Authentication"}, {"uroven": 2, "text": "Request headers"}, {"uroven": 2, "text": "Debugging requests"}, {"uroven": 3, "text": "Supplying your own request ID with X-Client-Request-Id"}, {"uroven": 2, "text": "Backwards compatibility"}], "markdown": "# API Overview\n\nUse this reference to look up OpenAI API endpoints, request and response\nschemas, streaming events, client library methods, and shared behavior such as\nauthentication, errors, rate limits, and request IDs.\n\n## Start here\n\nSection titled “Start here”\n\n1. Choose the API surface for your application:\n - [Responses](/api/reference/responses/overview) for direct model requests, tool use, audio, image, and text inputs, and stateful interactions.\n - [Realtime API](/api/docs/guides/realtime) for low-latency voice or audio sessions over WebRTC, WebSocket, or SIP. Use the [client events](/api/reference/resources/realtime/client-events) and [server events](/api/reference/resources/realtime/server-events) references while building sessions.\n - [Administration](/api/reference/administration/overview) for organization workflows such as users, invites, projects, API keys, and audit logs.\n2. Create credentials. Use a standard [API key](https://platform.openai.com/settings/organization/api-keys) for application requests, an [Admin API key](https://platform.openai.com/settings/organization/admin-keys) for Administration endpoints, or [workload identity federation](/api/docs/guides/workload-identity-federation) for short-lived access tokens.\n3. Install an official client library from the [libraries page](/api/docs/libraries) , or call the HTTP API directly from any environment that supports HTTP requests.\n4. Make a first request with the [developer quickstart](/api/docs/quickstart) or go straight to the [Responses create reference](/api/reference/resources/responses/methods/create) .\n5. Before production, review [error codes](/api/docs/guides/error-codes) , [rate limits](/api/docs/guides/rate-limits) , and request ID logging below.\n\n## Authentication\n\nSection titled “Authentication”\n\nThe OpenAI API accepts bearer credentials from API keys or from short-lived access tokens created with [workload identity federation](/api/docs/guides/workload-identity-federation).\n\n**Remember that your API key is a secret.** Don’t share it with others or expose it in any client-side code such as browsers or apps. Load API keys from an environment variable or key management service on the server.\n\nRevocations of an API key take effect within a few seconds. Most updates that\naffect authentication results of an API key propagate within 15 minutes, but\ncan potentially take longer.\n\nProvide API credentials with [HTTP Bearer authentication](https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/).\n\n```\nAuthorization: Bearer OPENAI_API_KEY_OR_ACCESS_TOKEN\n```\n\nIf you belong to more than one organization or access projects through a legacy user API key, pass a header to specify which organization and project to use for an API request:\n\n```\ncurl https://api.openai.com/v1/models \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"OpenAI-Organization: $ORGANIZATION_ID\" \\ -H \"OpenAI-Project: $PROJECT_ID\"\n```\n\nUsage from these API requests counts as usage for the specified organization and project. Find organization and project IDs in your [dashboard settings](https://platform.openai.com/settings/organization/general).\n\n## Request headers\n\nSection titled “Request headers”\n\nFor reliable behavior across API paths and HTTP versions, keep the total size\nof an API request’s headers under 64 KiB. This budget includes the names and\nvalues of all headers, including common headers such as `Authorization`,\n`Content-Type`, and `User-Agent`, as well as any custom headers.\n\nTo leave room for required headers and headers added by intermediaries, keep\nany individual custom header value and the total size of all custom header\nvalues at 60 KiB or less. Requests with larger headers may fail before they\nreach the API, so you may not receive a response or an `x-request-id`.\n\n## Debugging requests\n\nSection titled “Debugging requests”\n\n[Error codes](/api/docs/guides/error-codes) describe failures returned from API responses. Inspect HTTP response headers for the unique ID of a request and rate limit details. Common response headers include:\n\n**API meta information**\n\n- `openai-organization` : The [organization](/api/docs/guides/production-best-practices#setting-up-your-organization) associated with the request\n- `openai-processing-ms` : Time taken processing your API request\n- `openai-version` : REST API version used for this request (currently `2020-10-01` )\n- `x-request-id` : Unique identifier for this API request (used in troubleshooting)\n\n**[Rate limiting information](/api/docs/guides/rate-limits)**\n\n- `x-ratelimit-limit-requests`\n- `x-ratelimit-limit-tokens`\n- `x-ratelimit-remaining-requests`\n- `x-ratelimit-remaining-tokens`\n- `x-ratelimit-reset-requests`\n- `x-ratelimit-reset-tokens`\n- `x-ratelimit-limit-project-tokens`\n- `x-ratelimit-remaining-project-tokens`\n- `x-ratelimit-reset-project-tokens`\n\nProject-token headers may be present when a project-scoped token limit applies.\n\n**OpenAI recommends logging request IDs in production deployments** for more efficient troubleshooting with the [support team](https://help.openai.com/en/), should the need arise. Official [client libraries](/api/docs/libraries) provide a property on top-level response objects containing the value of the `x-request-id` header.\n\n### Supplying your own request ID with `X-Client-Request-Id`\n\nSection titled “Supplying your own request ID with X-Client-Request-Id”\n\nAlong with the server-generated `x-request-id`, you can supply your own unique identifier for each request via the `X-Client-Request-Id` request header. This header isn’t added automatically; you must explicitly set it on the request.\n\nWhen you include `X-Client-Request-Id`:\n\n- You control the ID format (for example, a UUID or your internal trace ID), but it must contain only ASCII characters and be no more than 512 characters long; otherwise, the request will fail with a 400 error. Make this value unique per request.\n- OpenAI logs this value internally for supported endpoints, including chat/completions, embeddings, responses, and more.\n- In cases like timeouts or network issues when you can’t get the `X-Request-Id` response header, you can share the `X-Client-Request-Id` value with the support team to look up whether OpenAI received the request and when.\n\n**Example:**\n\n```\ncurl https://api.openai.com/v1/chat/completions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"X-Client-Request-Id: 123e4567-e89b-12d3-a456-426614174000\"\n```\n\n## Backwards compatibility\n\nSection titled “Backwards compatibility”\n\nOpenAI provides stability to API users by avoiding breaking changes in major API versions whenever reasonably possible. This includes:\n\n- The REST API (currently `v1` )\n- First-party [client libraries](/api/docs/libraries) (released libraries adhere to [semantic versioning](https://semver.org/) )\n- [Model](/api/docs/models) families (like `gpt-4o` or `o4-mini` )\n\n**Model prompting behavior between snapshots is subject to change**.\nModel outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run [evals](/api/docs/guides/evals) for your applications.\n\n**Backwards-compatible API changes**:\n\n- Adding new resources (URLs) to the REST API and client libraries\n- Adding new optional API parameters\n- Adding new properties to JSON response objects or event data\n- Changing the order of properties in a JSON response object\n- Changing the length or format of opaque strings, like resource identifiers\n- Adding new event types in streaming APIs\n\nSee the [changelog](/api/docs/changelog) for a list of backwards-compatible changes and rare breaking changes.", "znaku_textu": 7584, "slov": 1031, "odkazu": 390, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:41:34", "sha256": "5c877cb85fb6b9ce2017b7045cd56125a1316ccb8aa9cec8e3274a7eaf51d57c", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://platform.openai.com/settings/organization/api-keys", "https://platform.openai.com/settings/organization/admin-keys", "https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/", "https://platform.openai.com/settings/organization/general", "https://help.openai.com/en/", "https://semver.org/"]} {"url": "https://developers.openai.com/api/docs/api-reference/admin-api-keys", "titulek": "Admin API Keys | OpenAI API Reference", "h1": "Admin API Keys", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Admin API Keys", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Admin", "Organization"], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAdminAPIKey object { id, created_at, expires_at, 5 more } Represents an individual Admin API key in an org.id: stringThe identifier, which can be referenced in API endpointscreated_at: numberThe Unix timestamp (in seconds) of when the API key was createdformatunixtimeexpires_at: number or nullThe Unix timestamp (in seconds) of when the API key expiresformatunixtimeobject: \"organization.admin_api_key\"The object type, which is always `organization.admin_api_key`owner: object { id, created_at, name, 3 more } id: optional stringThe identifier, which can be referenced in API endpointscreated_at: optional numberThe Unix timestamp (in seconds) of when the user was createdformatunixtimename: optional stringThe name of the userobject: optional stringThe object type, which is always organization.userrole: optional stringAlways `owner`type: optional stringAlways `user`redacted_value: stringThe redacted value of the API keylast_used_at: optional number or nullThe Unix timestamp (in seconds) of when the API key was last usedformatunixtimename: optional string or nullThe name of the API key\n\nAdminAPIKeyCreateResponse = [AdminAPIKey](/api/reference/resources/admin#(resource)%20admin.organization.admin_api_keys%20%3E%20(model)%20admin_api_key%20%3E%20(schema)) { id, created_at, expires_at, 5 more } Represents an individual Admin API key in an org.value: stringThe value of the API key. Only shown on create.\n\nAdminAPIKeyDeleteResponse object { id, deleted, object } id: stringdeleted: booleanobject: \"organization.admin_api_key.deleted\"", "znaku_textu": 1559, "slov": 188, "odkazu": 393, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:02:16", "sha256": "1e234e18231ef717aa4f26770336f37391b329d23d6ab1fdc183fda068cadae1", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/administration", "titulek": "API Overview | OpenAI API Reference", "h1": "API Overview", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/overview/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "API Overview", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/overview/", "og:locale": "en", "og:site_name": "OpenAI API Reference", "og:image": "https://developers.openai.com/og/api/reference/overview.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 1, "text": "API Overview"}, {"uroven": 2, "text": "Start here"}, {"uroven": 2, "text": "Authentication"}, {"uroven": 2, "text": "Request headers"}, {"uroven": 2, "text": "Debugging requests"}, {"uroven": 3, "text": "Supplying your own request ID with X-Client-Request-Id"}, {"uroven": 2, "text": "Backwards compatibility"}], "markdown": "# API Overview\n\nUse this reference to look up OpenAI API endpoints, request and response\nschemas, streaming events, client library methods, and shared behavior such as\nauthentication, errors, rate limits, and request IDs.\n\n## Start here\n\nSection titled “Start here”\n\n1. Choose the API surface for your application:\n - [Responses](/api/reference/responses/overview) for direct model requests, tool use, audio, image, and text inputs, and stateful interactions.\n - [Realtime API](/api/docs/guides/realtime) for low-latency voice or audio sessions over WebRTC, WebSocket, or SIP. Use the [client events](/api/reference/resources/realtime/client-events) and [server events](/api/reference/resources/realtime/server-events) references while building sessions.\n - [Administration](/api/reference/administration/overview) for organization workflows such as users, invites, projects, API keys, and audit logs.\n2. Create credentials. Use a standard [API key](https://platform.openai.com/settings/organization/api-keys) for application requests, an [Admin API key](https://platform.openai.com/settings/organization/admin-keys) for Administration endpoints, or [workload identity federation](/api/docs/guides/workload-identity-federation) for short-lived access tokens.\n3. Install an official client library from the [libraries page](/api/docs/libraries) , or call the HTTP API directly from any environment that supports HTTP requests.\n4. Make a first request with the [developer quickstart](/api/docs/quickstart) or go straight to the [Responses create reference](/api/reference/resources/responses/methods/create) .\n5. Before production, review [error codes](/api/docs/guides/error-codes) , [rate limits](/api/docs/guides/rate-limits) , and request ID logging below.\n\n## Authentication\n\nSection titled “Authentication”\n\nThe OpenAI API accepts bearer credentials from API keys or from short-lived access tokens created with [workload identity federation](/api/docs/guides/workload-identity-federation).\n\n**Remember that your API key is a secret.** Don’t share it with others or expose it in any client-side code such as browsers or apps. Load API keys from an environment variable or key management service on the server.\n\nRevocations of an API key take effect within a few seconds. Most updates that\naffect authentication results of an API key propagate within 15 minutes, but\ncan potentially take longer.\n\nProvide API credentials with [HTTP Bearer authentication](https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/).\n\n```\nAuthorization: Bearer OPENAI_API_KEY_OR_ACCESS_TOKEN\n```\n\nIf you belong to more than one organization or access projects through a legacy user API key, pass a header to specify which organization and project to use for an API request:\n\n```\ncurl https://api.openai.com/v1/models \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"OpenAI-Organization: $ORGANIZATION_ID\" \\ -H \"OpenAI-Project: $PROJECT_ID\"\n```\n\nUsage from these API requests counts as usage for the specified organization and project. Find organization and project IDs in your [dashboard settings](https://platform.openai.com/settings/organization/general).\n\n## Request headers\n\nSection titled “Request headers”\n\nFor reliable behavior across API paths and HTTP versions, keep the total size\nof an API request’s headers under 64 KiB. This budget includes the names and\nvalues of all headers, including common headers such as `Authorization`,\n`Content-Type`, and `User-Agent`, as well as any custom headers.\n\nTo leave room for required headers and headers added by intermediaries, keep\nany individual custom header value and the total size of all custom header\nvalues at 60 KiB or less. Requests with larger headers may fail before they\nreach the API, so you may not receive a response or an `x-request-id`.\n\n## Debugging requests\n\nSection titled “Debugging requests”\n\n[Error codes](/api/docs/guides/error-codes) describe failures returned from API responses. Inspect HTTP response headers for the unique ID of a request and rate limit details. Common response headers include:\n\n**API meta information**\n\n- `openai-organization` : The [organization](/api/docs/guides/production-best-practices#setting-up-your-organization) associated with the request\n- `openai-processing-ms` : Time taken processing your API request\n- `openai-version` : REST API version used for this request (currently `2020-10-01` )\n- `x-request-id` : Unique identifier for this API request (used in troubleshooting)\n\n**[Rate limiting information](/api/docs/guides/rate-limits)**\n\n- `x-ratelimit-limit-requests`\n- `x-ratelimit-limit-tokens`\n- `x-ratelimit-remaining-requests`\n- `x-ratelimit-remaining-tokens`\n- `x-ratelimit-reset-requests`\n- `x-ratelimit-reset-tokens`\n- `x-ratelimit-limit-project-tokens`\n- `x-ratelimit-remaining-project-tokens`\n- `x-ratelimit-reset-project-tokens`\n\nProject-token headers may be present when a project-scoped token limit applies.\n\n**OpenAI recommends logging request IDs in production deployments** for more efficient troubleshooting with the [support team](https://help.openai.com/en/), should the need arise. Official [client libraries](/api/docs/libraries) provide a property on top-level response objects containing the value of the `x-request-id` header.\n\n### Supplying your own request ID with `X-Client-Request-Id`\n\nSection titled “Supplying your own request ID with X-Client-Request-Id”\n\nAlong with the server-generated `x-request-id`, you can supply your own unique identifier for each request via the `X-Client-Request-Id` request header. This header isn’t added automatically; you must explicitly set it on the request.\n\nWhen you include `X-Client-Request-Id`:\n\n- You control the ID format (for example, a UUID or your internal trace ID), but it must contain only ASCII characters and be no more than 512 characters long; otherwise, the request will fail with a 400 error. Make this value unique per request.\n- OpenAI logs this value internally for supported endpoints, including chat/completions, embeddings, responses, and more.\n- In cases like timeouts or network issues when you can’t get the `X-Request-Id` response header, you can share the `X-Client-Request-Id` value with the support team to look up whether OpenAI received the request and when.\n\n**Example:**\n\n```\ncurl https://api.openai.com/v1/chat/completions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"X-Client-Request-Id: 123e4567-e89b-12d3-a456-426614174000\"\n```\n\n## Backwards compatibility\n\nSection titled “Backwards compatibility”\n\nOpenAI provides stability to API users by avoiding breaking changes in major API versions whenever reasonably possible. This includes:\n\n- The REST API (currently `v1` )\n- First-party [client libraries](/api/docs/libraries) (released libraries adhere to [semantic versioning](https://semver.org/) )\n- [Model](/api/docs/models) families (like `gpt-4o` or `o4-mini` )\n\n**Model prompting behavior between snapshots is subject to change**.\nModel outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run [evals](/api/docs/guides/evals) for your applications.\n\n**Backwards-compatible API changes**:\n\n- Adding new resources (URLs) to the REST API and client libraries\n- Adding new optional API parameters\n- Adding new properties to JSON response objects or event data\n- Changing the order of properties in a JSON response object\n- Changing the length or format of opaque strings, like resource identifiers\n- Adding new event types in streaming APIs\n\nSee the [changelog](/api/docs/changelog) for a list of backwards-compatible changes and rare breaking changes.", "znaku_textu": 7584, "slov": 1031, "odkazu": 390, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:04:15", "sha256": "5c877cb85fb6b9ce2017b7045cd56125a1316ccb8aa9cec8e3274a7eaf51d57c", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://platform.openai.com/settings/organization/api-keys", "https://platform.openai.com/settings/organization/admin-keys", "https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/", "https://platform.openai.com/settings/organization/general", "https://help.openai.com/en/", "https://semver.org/"]} {"url": "https://developers.openai.com/api/docs/api-reference/assistants", "titulek": "Assistants migration guide | OpenAI API", "h1": "Assistants migration guide", "popis": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/assistants/migration", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/assistants/migration", "og:site_name": "OpenAI Developers", "og:title": "Assistants migration guide | OpenAI API", "og:description": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "og:image": "https://developers.openai.com/og/api/docs/assistants/migration.png", "og:image:alt": "Assistants migration guide | OpenAI API", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 3, "text": "What’s changed?"}, {"uroven": 2, "text": "From assistants to prompts"}, {"uroven": 3, "text": "Why this is helpful"}, {"uroven": 3, "text": "Practical migration steps"}, {"uroven": 2, "text": "From threads to conversations"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "From runs to responses"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "Migrating your integration"}, {"uroven": 3, "text": "1. Create prompts from your assistants"}, {"uroven": 3, "text": "2. Move new user chats over to conversations and responses"}, {"uroven": 2, "text": "Comparing full examples"}, {"uroven": 3, "text": "User chat app"}], "markdown": "The Assistants API was officially sunset on August 26, 2026, and is no longer available. Use the [Responses API](/api/docs/guides/migrate-to-responses) for new integrations.\n\nThank you to everyone who used the Assistants API. We appreciate everything you built and the feedback you shared along the way.\n\nUse this guide to migrate your integration to the [Responses API](/api/docs/guides/migrate-to-responses).\n\nResponses are simpler—send input items and get output items back. With the Responses API, you also get better performance and new features like [deep research](/api/docs/guides/deep-research), [MCP](/api/docs/guides/tools-remote-mcp), and [computer use](/api/docs/guides/tools-computer-use). This change also lets you manage conversations instead of passing back `previous_response_id`.\n\n### What’s changed?\n\n| Before | Now | Why? |\n| --- | --- | --- |\n| `Assistants` | `Prompts` | Prompts hold configuration (model, tools, instructions) and are easier\nto version and update |\n| `Threads` | `Conversations` | Streams of items instead of just messages |\n| `Runs` | `Responses` | Responses send input items or use a conversation object and receive\noutput items; tool call loops are explicitly managed |\n| `Run steps` | `Items` | Generalized objects—can be messages, tool calls, outputs, and more |\n\n## From assistants to prompts\n\nAssistants were persistent API objects that bundled model choice, instructions, and tool declarations—created and managed entirely through the API. Their replacement, prompts, can only be created in the dashboard, where you can version them as you develop your product.\n\n### Why this is helpful\n\n- **Portability and versioning** : You can snapshot, review, diff, and roll back prompt specs. You can also version a prompt, so your code can just point the latest version.\n- **Separation of concerns** : Your application code now handles orchestration (history pruning, tool loop, retries) while your prompt focuses on high‑level behavior and constraints (system guidance, tool availability, structured output schema, temperature defaults).\n- **Realtime compatibility** : The same prompt configuration can be reused when you connect through the Realtime API, giving you a single definition of behavior across chat, streaming, and low‑latency interactive sessions.\n- **Tool and output consistency** : Using prompts, every Responses or Realtime session you start inherits a consistent contract because prompts encapsulate tool schemas and structured output expectations.\n\n### Practical migration steps\n\n1. Identify each existing Assistant’s *instruction + tool* bundle.\n2. In the dashboard, recreate that bundle as a named prompt.\n3. Store the prompt ID (or its exported spec) in source control so application code can refer to a stable identifier.\n4. During rollout, run A/B tests by swapping prompt IDs—no need to create or delete assistant objects programmatically.\n\nThink of a prompt as a **versioned behavioral profile** to plug into either Responses or Realtime API.\n\n---\n\n## From threads to conversations\n\nA thread was a collection of messages stored server-side. Threads could *only* store messages. Conversations store items, which can include messages, tool calls, tool outputs, and other data.\n\n### Request example\n\n#### Python\n\n`1 2 3 4thread = openai.beta.threads.create( messages=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )``1 2 3 4conversation = openai.conversations.create( items=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12thread, err := client.Beta.Threads.New(context.Background(), openai.BetaThreadNewParams{ Messages: []openai.BetaThreadNewParamsMessage{{ Role: \"user\", Content: openai.BetaThreadNewParamsMessageContentUnion{ OfString: openai.String(\"what are the 5 Ds of dodgeball?\"), }, }}, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }``1 2 3 4 5 6 7 8 9conversation, err := client.Conversations.New(context.Background(), conversations.ConversationNewParams{ Items: []responses.ResponseInputItemUnionParam{ responses.ResponseInputItemParamOfMessage(\"what are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9{ \"id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"object\": \"thread\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" }, \"tool_resources\": {} }``1 2 3 4 5 6 7 8{ \"id\": \"conv_68542dc602388199a30af27d040cefd4087a04b576bfeb24\", \"object\": \"conversation\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" } }`\n\n---\n\n## From runs to responses\n\nRuns were asynchronous processes that executed against threads. See the example below. Responses are simpler: provide a set of input items to execute, and get a list of output items back.\n\nResponses are designed to be used alone, but you can also use them with prompt and conversation objects for storing context and configuration.\n\n### Request example\n\n#### Python\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17# Replace the illustrative IDs and URLs below with your own resource values. import time from openai import OpenAI openai = OpenAI() thread_id = \"thread_123\" assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( thread_id=thread_id, assistant_id=assistant_id, ) while run.status in (\"queued\", \"in_progress\"): time.sleep(1) run = openai.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run.id)``1 2 3 4 5 6 7 8 9 10 11 12# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() conversation_id = \"conv_123\" response = openai.responses.create( model=\"gpt-6-astra\", input=[{\"role\": \"user\", \"content\": \"What are the 5 Ds of dodgeball?\"}], conversation=conversation_id, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13run, err := client.Beta.Threads.Runs.New(context.Background(), \"thread_abc123\", openai.BetaThreadRunNewParams{ AssistantID: \"asst_abc123\", }) if err != nil { panic(err) } for run.Status == openai.RunStatusQueued || run.Status == openai.RunStatusInProgress { time.Sleep(time.Second) run, err = client.Beta.Threads.Runs.Get(context.Background(), \"thread_abc123\", run.ID) if err != nil { panic(err) } }``1 2 3 4 5 6 7 8 9 10_, err := client.Responses.New(context.Background(), responses.ResponseNewParams{ Model: \"gpt-6-astra\", Input: responses.ResponseNewParamsInputUnion{OfInputItemList: responses.ResponseInputParam{ responses.ResponseInputItemParamOfMessage(\"What are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }}, Conversation: responses.ResponseNewParamsConversationUnion{OfString: openai.String(\"conv_abc123\")}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44{ \"id\": \"run_FKIpcs5ECSwuCmehBqsqkORj\", \"assistant_id\": \"asst_8fVY45hU3IM6creFkVi5MBKB\", \"cancelled_at\": null, \"completed_at\": 1752857327, \"created_at\": 1752857322, \"expires_at\": null, \"failed_at\": null, \"incomplete_details\": null, \"instructions\": null, \"last_error\": null, \"max_completion_tokens\": null, \"max_prompt_tokens\": null, \"metadata\": {}, \"model\": \"gpt-4.1\", \"object\": \"thread.run\", \"parallel_tool_calls\": true, \"required_action\": null, \"response_format\": \"auto\", \"started_at\": 1752857324, \"status\": \"completed\", \"thread_id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"tool_choice\": \"auto\", \"tools\": [], \"truncation_strategy\": { \"type\": \"auto\", \"last_messages\": null }, \"usage\": { \"completion_tokens\": 130, \"prompt_tokens\": 34, \"total_tokens\": 164, \"prompt_token_details\": { \"cached_tokens\": 0 }, \"completion_tokens_details\": { \"reasoning_tokens\": 0 } }, \"temperature\": 1.0, \"top_p\": 1.0, \"tool_resources\": {}, \"reasoning_effort\": null }``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76{ \"id\": \"resp_687a7b53036c819baad6012d58b39bcb074adcd9e24850fc\", \"created_at\": 1752857427, \"conversation\": { \"id\": \"conv_689667905b048191b4740501625afd940c7533ace33a2dab\" }, \"error\": null, \"incomplete_details\": null, \"instructions\": null, \"metadata\": {}, \"model\": \"gpt-5.5\", \"object\": \"response\", \"output\": [ { \"id\": \"msg_687a7b542948819ba79e77e14791ef83074adcd9e24850fc\", \"content\": [ { \"annotations\": [], \"text\": \"The \\\"5 Ds of Dodgeball\\\" are a humorous set of rules made famous by the 2004 comedy film **\\\"Dodgeball: A True Underdog Story.\\\"** In the movie, dodgeball coach Patches O’Houlihan teaches these basics to his team. The **5 Ds** are: 1. **Dodge** 2. **Duck** 3. **Dip** 4. **Dive** 5. **Dodge** (yes, dodge is listed twice for emphasis!) In summary: > **“If you can dodge a wrench, you can dodge a ball!”** These 5 Ds are not official competitive rules, but have become a fun and memorable pop culture reference for the sport of dodgeball.\", \"type\": \"output_text\", \"logprobs\": [] } ], \"role\": \"assistant\", \"status\": \"completed\", \"type\": \"message\" } ], \"parallel_tool_calls\": true, \"temperature\": 1.0, \"tool_choice\": \"auto\", \"tools\": [], \"top_p\": 1.0, \"background\": false, \"max_output_tokens\": null, \"previous_response_id\": null, \"reasoning\": { \"effort\": null, \"generate_summary\": null, \"summary\": null }, \"service_tier\": \"scale\", \"status\": \"completed\", \"text\": { \"format\": { \"type\": \"text\" } }, \"truncation\": \"disabled\", \"usage\": { \"input_tokens\": 17, \"input_tokens_details\": { \"cached_tokens\": 0 }, \"output_tokens\": 150, \"output_tokens_details\": { \"reasoning_tokens\": 0 }, \"total_tokens\": 167 }, \"user\": null, \"max_tool_calls\": null, \"store\": true, \"top_logprobs\": 0 }`\n\n---\n\n## Migrating your integration\n\nFollow the migration steps below to move from the Assistants API to the Responses API, without losing any feature support.\n\n### 1. Create prompts from your assistants\n\n1. Identify the most important assistant objects in your application.\n2. Find these in the dashboard and click `Create prompt` .\n\nThis will create a prompt object out of each existing assistant object.\n\nReusable prompt objects are also being deprecated. If you use this migration\npath, review the [prompts deprecation\ntimeline](/api/docs/deprecations#2026-06-03-reusable-prompts) before adopting\nprompt objects in a long-lived integration.\n\n### 2. Move new user chats over to conversations and responses\n\nStart new chats with the Conversations API and Responses API. To preserve earlier conversation history, use messages already stored by your application.\n\nThe example below shows how thread history could be migrated before the sunset. The Assistants API call that retrieves thread messages no longer works; use your stored messages instead.\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() messages = [] thread_id = \"thread_123\" for page in openai.beta.threads.messages.list( thread_id=thread_id, order=\"asc\" ).iter_pages(): messages += page.data items = [] for m in messages: item = {\"role\": m.role} item_content = [] for content in m.content: match content.type: case \"text\": item_content_type = \"input_text\" if m.role == \"user\" else \"output_text\" item_content += [ {\"type\": item_content_type, \"text\": content.text.value} ] case \"image_url\": item_content += [ { \"type\": \"input_image\", \"image_url\": content.image_url.url, \"detail\": content.image_url.detail, } ] item |= {\"content\": item_content} items.append(item) # create a conversation with your converted items conversation = openai.conversations.create(items=items)\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new thread_id = \"thread_123\" messages = client.beta.threads.messages.list(thread_id, order: :asc) items = [] messages.auto_paging_each do |message| content = message.content.filter_map do |part| case part when OpenAI::Models::Beta::Threads::TextContentBlock type = if message.role == OpenAI::Models::Beta::Threads::Message::Role::USER :input_text else :output_text end { type: type, text: part.text.value } when OpenAI::Models::Beta::Threads::ImageURLContentBlock { type: :input_image, image_url: part.image_url.url, detail: part.image_url.detail } end end items << { role: message.role, content: content } end conversation = client.conversations.create( items: items ) puts(conversation.id)\n```\n\n## Comparing full examples\n\nHere are a few examples of integrations using both the Assistants API and the Responses API so you can see how they compare.\n\n### User chat app\n\nAssistants API\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36# Replace the illustrative IDs and URLs below with your own resource values. threads_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): thread_id = threads_by_session.get(message.session_id) if thread_id is None: thread_id = openai.beta.threads.create().id threads_by_session[message.session_id] = thread_id openai.beta.threads.messages.create( thread_id=thread_id, role=\"user\", content=message.content, ) example_assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( assistant_id=example_assistant_id, thread_id=thread_id, ) while run.status in (\"queued\", \"in_progress\"): await asyncio.sleep(1) run = openai.beta.threads.runs.retrieve( thread_id=thread_id, run_id=run.id, ) messages = openai.beta.threads.messages.list( order=\"desc\", limit=1, thread_id=thread_id, ) return {\"content\": messages.data[0].content}``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new assistant_id = \"asst_123\" threads_by_session = {} handle_message = lambda do |session_id:, content:| thread_id = threads_by_session[session_id] unless thread_id thread_id = client.beta.threads.create.id threads_by_session[session_id] = thread_id end client.beta.threads.messages.create( thread_id, role: :user, content: content ) run = client.beta.threads.runs.create( thread_id, assistant_id: assistant_id ) while [:queued, :in_progress].include?(run.status) sleep(1) run = client.beta.threads.runs.retrieve(run.id, thread_id: thread_id) end messages = client.beta.threads.messages.list( thread_id, order: :desc, limit: 1 ) { content: messages.data&.first&.content } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )`\n\nResponses API\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50// Replace the illustrative IDs and URLs below with your own resource values. import express from \"express\"; import OpenAI from \"openai\"; const app = express(); const client = new OpenAI(); const conversationsBySession = new Map(); app.use(express.json()); app.post(\"/messages\", async (request, response) => { const { content, session_id: sessionId } = request.body ?? {}; if ( typeof content !== \"string\" || !content.trim() || typeof sessionId !== \"string\" || !sessionId.trim() ) { response.status(400).json({ error: \"content and session_id must be non-empty strings.\", }); return; } let conversationIdPromise = conversationsBySession.get(sessionId); if (!conversationIdPromise) { conversationIdPromise = client.conversations .create() .then((conversation) => conversation.id) .catch((error) => { conversationsBySession.delete(sessionId); throw error; }); conversationsBySession.set(sessionId, conversationIdPromise); } const conversationId = await conversationIdPromise; const promptId = \"pmpt_123\"; const result = await client.responses.create({ prompt: { id: promptId }, input: [{ role: \"user\", content }], conversation: conversationId, }); response.json({ content: result.output_text }); }); app.listen(Number(process.env.OPENAI_EXAMPLE_PORT ?? 8000), \"127.0.0.1\");\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19# Replace the illustrative IDs and URLs below with your own resource values. conversations_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): conversation_id = conversations_by_session.get(message.session_id) if conversation_id is None: conversation_id = openai.conversations.create().id conversations_by_session[message.session_id] = conversation_id example_prompt_id = \"pmpt_123\" response = openai.responses.create( prompt={\"id\": example_prompt_id}, input=[{\"role\": \"user\", \"content\": message.content}], conversation=conversation_id, ) return {\"content\": response.output_text}\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new conversations_by_session = {} handle_message = lambda do |session_id:, content:| conversation_id = conversations_by_session[session_id] unless conversation_id conversation_id = client.conversations.create.id conversations_by_session[session_id] = conversation_id end response = client.responses.create( prompt: { id: \"pmpt_123\" }, input: [ { role: :user, content: content } ], conversation: conversation_id ) { content: response.output_text } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )\n```", "znaku_textu": 17534, "slov": 2354, "odkazu": 474, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:30", "sha256": "53f9f37febb4259ae4be52a7a71feffb70531c2e9814bd13d739f9ad6e049109", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/api-reference/audio", "titulek": "Audio | OpenAI API Reference", "h1": "Audio", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/audio/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Audio", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/audio/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioModel = \"whisper-1\" or \"gpt-transcribe\" or \"gpt-4o-transcribe\" or 3 moreOne of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-4o-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe-diarize\"\n\nAudioResponseFormat = \"json\" or \"text\" or \"srt\" or 3 moreThe format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.One of the following:\"json\"\"text\"\"srt\"\"verbose_json\"\"vtt\"\"diarized_json\"\n\n##### ModelsExpand Collapse\n\nSpeechModel = \"tts-1\" or \"tts-1-hd\" or \"gpt-4o-mini-tts\" or \"gpt-4o-mini-tts-2025-12-15\"One of the following:\"tts-1\"\"tts-1-hd\"\"gpt-4o-mini-tts\"\"gpt-4o-mini-tts-2025-12-15\"\n\n##### ModelsExpand Collapse\n\nTranscription object { text, languages, logprobs, usage } Represents a transcription response returned by model, based on the provided input.text: stringThe transcribed text.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.token: optional stringThe token in the transcription.bytes: optional array of numberThe bytes of the token.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.\n\nTranscriptionCreateResponse = [Transcription](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription%20%3E%20(schema)) { text, languages, logprobs, usage } or [TranscriptionDiarized](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_diarized%20%3E%20(schema)) { duration, segments, task, 2 more } or [TranscriptionVerbose](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_verbose%20%3E%20(schema)) { duration, language, text, 3 more } Represents a transcription response returned by model, based on the provided input.One of the following:Transcription object { text, languages, logprobs, usage } Represents a transcription response returned by model, based on the provided input.text: stringThe transcribed text.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.token: optional stringThe token in the transcription.bytes: optional array of numberThe bytes of the token.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.TranscriptionDiarized object { duration, segments, task, 2 more } Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.duration: numberDuration of the input audio in seconds.formatdoublesegments: array of [TranscriptionDiarizedSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_diarized_segment%20%3E%20(schema)) { id, end, speaker, 3 more } Segments of the transcript annotated with timestamps and speaker labels.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, …).start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the segment. Always `transcript.text.segment`.task: \"transcribe\"The type of task that was run. Always `transcribe`.text: stringThe concatenated transcript text for the entire audio input.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token or duration usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.TranscriptionVerbose object { duration, language, text, 3 more } Represents a verbose json transcription response returned by model, based on the provided input.duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the input audio.text: stringThe transcribed text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the transcribed text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.usage: optional object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.words: optional array of [TranscriptionWord](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_word%20%3E%20(schema)) { end, start, word } Extracted words and their corresponding timestamps.end: numberEnd time of the word in seconds.formatdoublestart: numberStart time of the word in seconds.formatdoubleword: stringThe text content of the word.\n\nTranscriptionDiarized object { duration, segments, task, 2 more } Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.duration: numberDuration of the input audio in seconds.formatdoublesegments: array of [TranscriptionDiarizedSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_diarized_segment%20%3E%20(schema)) { id, end, speaker, 3 more } Segments of the transcript annotated with timestamps and speaker labels.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, …).start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the segment. Always `transcript.text.segment`.task: \"transcribe\"The type of task that was run. Always `transcribe`.text: stringThe concatenated transcript text for the entire audio input.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token or duration usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.\n\nTranscriptionDiarizedSegment object { id, end, speaker, 3 more } A segment of diarized transcript text with speaker metadata.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, …).start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the segment. Always `transcript.text.segment`.\n\nTranscriptionInclude = \"logprobs\"\n\nTranscriptionLanguage object { code } A language detected in transcribed audio.code: stringThe code of a language detected in the audio.\n\nTranscriptionSegment object { id, avg_logprob, compression_ratio, 7 more } id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.\n\nTranscriptionStreamEvent = [TranscriptionTextSegmentEvent](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_text_segment_event%20%3E%20(schema)) { id, end, speaker, 3 more } or [TranscriptionTextDeltaEvent](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_text_delta_event%20%3E%20(schema)) { delta, type, logprobs, segment_id } or [TranscriptionTextDoneEvent](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_text_done_event%20%3E%20(schema)) { text, type, languages, 2 more } Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.One of the following:TranscriptionTextSegmentEvent object { id, end, speaker, 3 more } Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment.start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the event. Always `transcript.text.segment`.TranscriptionTextDeltaEvent object { delta, type, logprobs, segment_id } Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.delta: stringThe text delta that was additionally transcribed.type: \"transcript.text.delta\"The type of the event. Always `transcript.text.delta`.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the delta. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.segment_id: optional stringIdentifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`.TranscriptionTextDoneEvent object { text, type, languages, 2 more } Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.text: stringThe text that was transcribed.type: \"transcript.text.done\"The type of the event. Always `transcript.text.done`.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.\n\nTranscriptionTextDeltaEvent object { delta, type, logprobs, segment_id } Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.delta: stringThe text delta that was additionally transcribed.type: \"transcript.text.delta\"The type of the event. Always `transcript.text.delta`.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the delta. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.segment_id: optional stringIdentifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`.\n\nTranscriptionTextDoneEvent object { text, type, languages, 2 more } Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.text: stringThe text that was transcribed.type: \"transcript.text.done\"The type of the event. Always `transcript.text.done`.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.\n\nTranscriptionTextSegmentEvent object { id, end, speaker, 3 more } Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment.start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the event. Always `transcript.text.segment`.\n\nTranscriptionVerbose object { duration, language, text, 3 more } Represents a verbose json transcription response returned by model, based on the provided input.duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the input audio.text: stringThe transcribed text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the transcribed text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.usage: optional object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.words: optional array of [TranscriptionWord](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_word%20%3E%20(schema)) { end, start, word } Extracted words and their corresponding timestamps.end: numberEnd time of the word in seconds.formatdoublestart: numberStart time of the word in seconds.formatdoubleword: stringThe text content of the word.\n\nTranscriptionWord object { end, start, word } end: numberEnd time of the word in seconds.formatdoublestart: numberStart time of the word in seconds.formatdoubleword: stringThe text content of the word.\n\n##### ModelsExpand Collapse\n\nTranslation object { text } text: string\n\nTranslationCreateResponse = [Translation](/api/reference/resources/audio#(resource)%20audio.translations%20%3E%20(model)%20translation%20%3E%20(schema)) { text } or [TranslationVerbose](/api/reference/resources/audio#(resource)%20audio.translations%20%3E%20(model)%20translation_verbose%20%3E%20(schema)) { duration, language, text, segments } One of the following:Translation object { text } text: stringTranslationVerbose object { duration, language, text, segments } duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the output translation (always `english`).text: stringThe translated text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the translated text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.\n\nTranslationVerbose object { duration, language, text, segments } duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the output translation (always `english`).text: stringThe translated text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the translated text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.\n\n##### ModelsExpand Collapse\n\n##### ModelsExpand Collapse\n\nVoiceCreateResponse object { id, created_at, name, object } A custom voice that can be used for audio output.id: stringThe voice identifier, which can be referenced in API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the voice was created.formatunixtimename: stringThe name of the voice.object: \"audio.voice\"The object type, which is always `audio.voice`.", "znaku_textu": 28257, "slov": 3305, "odkazu": 544, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:00", "sha256": "c9a6cffd9d035f6d4a2a66098be0799687bb130f16f206cb01b68508bc2ca1f4", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/audio/createSpeech", "titulek": "Create speech | OpenAI API Reference", "h1": "Create speech", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/audio/subresources/speech/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create speech", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/audio/subresources/speech/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Audio", "Speech"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 3, "text": "Create speech"}, {"uroven": 3, "text": "Create speech"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Generates audio from the input text.\n\nReturns the audio file content, or a stream of audio events.\n\n##### Body ParametersJSONExpand Collapse\n\ninput : string\n\nThe text to generate audio for. The maximum length is 4096 characters.\n\nmaxLength 4096\n\nmodel: string or [SpeechModel](/api/reference/resources/audio#(resource)%20audio.speech%20%3E%20(model)%20speech_model%20%3E%20(schema))One of the available [TTS models](/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.One of the following:stringSpeechModel = \"tts-1\" or \"tts-1-hd\" or \"gpt-4o-mini-tts\" or \"gpt-4o-mini-tts-2025-12-15\"One of the following:\"tts-1\"\"tts-1-hd\"\"gpt-4o-mini-tts\"\"gpt-4o-mini-tts-2025-12-15\"\n\nvoice: string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`. Previews of the voices are available in the [Text to speech guide](/api/docs/guides/text-to-speech#voice-options).One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\ninstructions : optional string\n\nControl the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`.\n\nmaxLength 4096\n\nresponse_format: optional \"mp3\" or \"opus\" or \"aac\" or 3 moreThe format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.One of the following:\"mp3\"\"opus\"\"aac\"\"flac\"\"wav\"\"pcm\"\n\nspeed : optional number\n\nThe speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.\n\nminimum 0.25\n\nmaximum 4\n\nstream_format: optional \"sse\" or \"audio\"The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.One of the following:\"sse\"\"audio\"\n\nDefault SSE Stream Format\n\n### Create speech\n\n```\ncurl https://api.openai.com/v1/audio/speech \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"model\": \"gpt-4o-mini-tts\", \"input\": \"The quick brown fox jumped over the lazy dog.\", \"voice\": \"alloy\" }' \\ --output speech.mp3 \n```\n\n### Create speech\n\n```\ncurl https://api.openai.com/v1/audio/speech \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"model\": \"gpt-4o-mini-tts\", \"input\": \"The quick brown fox jumped over the lazy dog.\", \"voice\": \"alloy\", \"stream_format\": \"sse\" }' \n```\n\n##### Returns Examples", "znaku_textu": 2696, "slov": 426, "odkazu": 409, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:54:31", "sha256": "508fa9fde03b1a6efb5f4523ba448879a68a91e0d1b75350a3772c6b74307f4b", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/audio/createTranscription", "titulek": "Create transcription | OpenAI API Reference", "h1": "Create transcription", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create transcription", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Audio", "Transcriptions"], "osnova": [{"uroven": 5, "text": "Body ParametersForm DataExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create transcription"}, {"uroven": 3, "text": "Create transcription"}, {"uroven": 3, "text": "Create transcription"}, {"uroven": 3, "text": "Create transcription"}, {"uroven": 3, "text": "Create transcription"}, {"uroven": 3, "text": "Create transcription"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Transcribes audio into the input language.\n\nReturns a transcription object in `json`, `diarized_json`, or `verbose_json`\nformat, or a stream of transcript events.\n\n##### Body ParametersForm DataExpand Collapse\n\nfile : file\n\nThe audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\nThe request must include enough format metadata for the file to be identified. We recommend an extension-bearing filename and an appropriate content type.\n\nmodel: string or [AudioModel](/api/reference/resources/audio#(resource)%20audio%20%3E%20(model)%20audio_model%20%3E%20(schema))ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.One of the following:stringAudioModel = \"whisper-1\" or \"gpt-transcribe\" or \"gpt-4o-transcribe\" or 3 moreOne of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-4o-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe-diarize\"\n\nchunking_strategy: optional \"auto\" or object { type, prefix_padding_ms, silence_duration_ms, threshold } or nullControls how the audio is cut into chunks. When set to `\"auto\"`, the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block. Required when using `gpt-4o-transcribe-diarize` for inputs longer than 30 seconds.One of the following:\"auto\"Automatically set chunking parameters based on the audio. Must be set to `\"auto\"`.VadConfig object { type, prefix_padding_ms, silence_duration_ms, threshold } type: \"server_vad\"Must be set to `server_vad` to enable manual chunking using server side VAD.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds).silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds).\nWith shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberSensitivity threshold (0.0 to 1.0) for voice activity detection. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n\ninclude : optional array of [TranscriptionInclude](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_include%20%3E%20(schema))\n\nAdditional information to include in the transcription response.\n`logprobs` will return the log probabilities of the tokens in the\nresponse to understand the model’s confidence in the transcription.\n`logprobs` only works with response_format set to `json` and only with\nthe models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`.\n\nkeywords : optional array of string\n\nWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe`.\n\nknown_speaker_names : optional array of string\n\nOptional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported.\n\nknown_speaker_references : optional array of string\n\nOptional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`.\n\nlanguage : optional string\n\nThe language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency.\n\nlanguages : optional array of string\n\nPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe`.\n\nprompt : optional string\n\nAn optional text to guide the model’s style or continue a previous audio segment. The [prompt](/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`.\n\nresponse_format: optional [AudioResponseFormat](/api/reference/resources/audio#(resource)%20audio%20%3E%20(model)%20audio_response_format%20%3E%20(schema))The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.One of the following:\"json\"\"text\"\"srt\"\"verbose_json\"\"vtt\"\"diarized_json\"\n\nstream : optional boolean or null\n\nIf set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section of the Speech-to-Text guide](/api/docs/guides/speech-to-text?lang=curl#streaming)\nfor more information.\n\nNote: Streaming is not supported for the `whisper-1` model and will be ignored.\n\ntemperature : optional number\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n\ntimestamp_granularities: optional array of \"word\" or \"segment\"The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.\nThis option is not available for `gpt-4o-transcribe-diarize`.One of the following:\"word\"\"segment\"\n\n##### ReturnsExpand Collapse\n\nTranscription object { text, languages, logprobs, usage } Represents a transcription response returned by model, based on the provided input.text: stringThe transcribed text.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.token: optional stringThe token in the transcription.bytes: optional array of numberThe bytes of the token.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.\n\nTranscriptionDiarized object { duration, segments, task, 2 more } Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.duration: numberDuration of the input audio in seconds.formatdoublesegments: array of [TranscriptionDiarizedSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_diarized_segment%20%3E%20(schema)) { id, end, speaker, 3 more } Segments of the transcript annotated with timestamps and speaker labels.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, …).start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the segment. Always `transcript.text.segment`.task: \"transcribe\"The type of task that was run. Always `transcribe`.text: stringThe concatenated transcript text for the entire audio input.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token or duration usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.\n\nTranscriptionVerbose object { duration, language, text, 3 more } Represents a verbose json transcription response returned by model, based on the provided input.duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the input audio.text: stringThe transcribed text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the transcribed text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.usage: optional object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.words: optional array of [TranscriptionWord](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_word%20%3E%20(schema)) { end, start, word } Extracted words and their corresponding timestamps.end: numberEnd time of the word in seconds.formatdoublestart: numberStart time of the word in seconds.formatdoubleword: stringThe text content of the word.\n\nDefault Diarization Logprobs Segment timestamps Streaming Word timestamps\n\n### Create transcription\n\n```\ncurl https://api.openai.com/v1/audio/transcriptions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: multipart/form-data\" \\ -F file=\"@/path/to/file/audio.mp3\" \\ -F model=\"gpt-4o-transcribe\" \n```\n\n```\n{ \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\", \"usage\": { \"type\": \"tokens\", \"input_tokens\": 14, \"input_token_details\": { \"text_tokens\": 0, \"audio_tokens\": 14 }, \"output_tokens\": 45, \"total_tokens\": 59 } } \n```\n\n### Create transcription\n\n```\ncurl https://api.openai.com/v1/audio/transcriptions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: multipart/form-data\" \\ -F file=\"@/path/to/file/meeting.wav\" \\ -F model=\"gpt-4o-transcribe-diarize\" \\ -F response_format=\"diarized_json\" \\ -F chunking_strategy=auto \\ -F 'known_speaker_names[]=agent' \\ -F 'known_speaker_references[]=data:audio/wav;base64,AAA...' \n```\n\n```\n{ \"task\": \"transcribe\", \"duration\": 27.4, \"text\": \"Agent: Thanks for calling OpenAI support.\\nA: Hi, I'm trying to enable diarization.\\nAgent: Happy to walk you through the steps.\", \"segments\": [ { \"type\": \"transcript.text.segment\", \"id\": \"seg_001\", \"start\": 0.0, \"end\": 4.7, \"text\": \"Thanks for calling OpenAI support.\", \"speaker\": \"agent\" }, { \"type\": \"transcript.text.segment\", \"id\": \"seg_002\", \"start\": 4.7, \"end\": 11.8, \"text\": \"Hi, I'm trying to enable diarization.\", \"speaker\": \"A\" }, { \"type\": \"transcript.text.segment\", \"id\": \"seg_003\", \"start\": 12.1, \"end\": 18.5, \"text\": \"Happy to walk you through the steps.\", \"speaker\": \"agent\" } ], \"usage\": { \"type\": \"duration\", \"seconds\": 27 } } \n```\n\n### Create transcription\n\n```\ncurl https://api.openai.com/v1/audio/transcriptions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: multipart/form-data\" \\ -F file=\"@/path/to/file/audio.mp3\" \\ -F \"include[]=logprobs\" \\ -F model=\"gpt-4o-transcribe\" \\ -F response_format=\"json\" \n```\n\n```\n{ \"text\": \"Hey, my knee is hurting and I want to see the doctor tomorrow ideally.\", \"logprobs\": [ { \"token\": \"Hey\", \"logprob\": -1.0415299, \"bytes\": [72, 101, 121] }, { \"token\": \",\", \"logprob\": -9.805982e-5, \"bytes\": [44] }, { \"token\": \" my\", \"logprob\": -0.00229799, \"bytes\": [32, 109, 121] }, { \"token\": \" knee\", \"logprob\": -4.7159858e-5, \"bytes\": [32, 107, 110, 101, 101] }, { \"token\": \" is\", \"logprob\": -0.043909557, \"bytes\": [32, 105, 115] }, { \"token\": \" hurting\", \"logprob\": -1.1041146e-5, \"bytes\": [32, 104, 117, 114, 116, 105, 110, 103] }, { \"token\": \" and\", \"logprob\": -0.011076359, \"bytes\": [32, 97, 110, 100] }, { \"token\": \" I\", \"logprob\": -5.3193703e-6, \"bytes\": [32, 73] }, { \"token\": \" want\", \"logprob\": -0.0017156356, \"bytes\": [32, 119, 97, 110, 116] }, { \"token\": \" to\", \"logprob\": -7.89631e-7, \"bytes\": [32, 116, 111] }, { \"token\": \" see\", \"logprob\": -5.5122365e-7, \"bytes\": [32, 115, 101, 101] }, { \"token\": \" the\", \"logprob\": -0.0040786397, \"bytes\": [32, 116, 104, 101] }, { \"token\": \" doctor\", \"logprob\": -2.3392786e-6, \"bytes\": [32, 100, 111, 99, 116, 111, 114] }, { \"token\": \" tomorrow\", \"logprob\": -7.89631e-7, \"bytes\": [32, 116, 111, 109, 111, 114, 114, 111, 119] }, { \"token\": \" ideally\", \"logprob\": -0.5800861, \"bytes\": [32, 105, 100, 101, 97, 108, 108, 121] }, { \"token\": \".\", \"logprob\": -0.00011093382, \"bytes\": [46] } ], \"usage\": { \"type\": \"tokens\", \"input_tokens\": 14, \"input_token_details\": { \"text_tokens\": 0, \"audio_tokens\": 14 }, \"output_tokens\": 45, \"total_tokens\": 59 } } \n```\n\n### Create transcription\n\n```\ncurl https://api.openai.com/v1/audio/transcriptions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: multipart/form-data\" \\ -F file=\"@/path/to/file/audio.mp3\" \\ -F \"timestamp_granularities[]=segment\" \\ -F model=\"whisper-1\" \\ -F response_format=\"verbose_json\" \n```\n\n```\n{ \"task\": \"transcribe\", \"language\": \"english\", \"duration\": 8.470000267028809, \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\", \"segments\": [ { \"id\": 0, \"seek\": 0, \"start\": 0.0, \"end\": 3.319999933242798, \"text\": \" The beach was a popular spot on a hot summer day.\", \"tokens\": [ 50364, 440, 7534, 390, 257, 3743, 4008, 322, 257, 2368, 4266, 786, 13, 50530 ], \"temperature\": 0.0, \"avg_logprob\": -0.2860786020755768, \"compression_ratio\": 1.2363636493682861, \"no_speech_prob\": 0.00985979475080967 }, ... ], \"usage\": { \"type\": \"duration\", \"seconds\": 9 } } \n```\n\n### Create transcription\n\n```\ncurl https://api.openai.com/v1/audio/transcriptions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: multipart/form-data\" \\ -F file=\"@/path/to/file/audio.mp3\" \\ -F model=\"gpt-4o-mini-transcribe\" \\ -F stream=true \n```\n\n```\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\"I\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" see\",\"logprobs\":[{\"token\":\" see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" skies\",\"logprobs\":[{\"token\":\" skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\" of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" blue\",\"logprobs\":[{\"token\":\" blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\" and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" clouds\",\"logprobs\":[{\"token\":\" clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\" of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" white\",\"logprobs\":[{\"token\":\" white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\" the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" bright\",\"logprobs\":[{\"token\":\" bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" blessed\",\"logprobs\":[{\"token\":\" blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" days\",\"logprobs\":[{\"token\":\" days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\" the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" dark\",\"logprobs\":[{\"token\":\" dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" sacred\",\"logprobs\":[{\"token\":\" sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" nights\",\"logprobs\":[{\"token\":\" nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\" and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" I\",\"logprobs\":[{\"token\":\" I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" think\",\"logprobs\":[{\"token\":\" think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" to\",\"logprobs\":[{\"token\":\" to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" myself\",\"logprobs\":[{\"token\":\" myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" what\",\"logprobs\":[{\"token\":\" what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" a\",\"logprobs\":[{\"token\":\" a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" wonderful\",\"logprobs\":[{\"token\":\" wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\" world\",\"logprobs\":[{\"token\":\" world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]}]} data: {\"type\":\"transcript.text.delta\",\"delta\":\".\",\"logprobs\":[{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}]} data: {\"type\":\"transcript.text.done\",\"text\":\"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]},{\"token\":\" see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]},{\"token\":\" skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]},{\"token\":\" of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]},{\"token\":\" blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]},{\"token\":\" and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]},{\"token\":\" clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]},{\"token\":\" of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]},{\"token\":\" white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]},{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]},{\"token\":\" the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]},{\"token\":\" bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]},{\"token\":\" blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]},{\"token\":\" days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]},{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]},{\"token\":\" the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]},{\"token\":\" dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]},{\"token\":\" sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]},{\"token\":\" nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]},{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]},{\"token\":\" and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]},{\"token\":\" I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]},{\"token\":\" think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]},{\"token\":\" to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]},{\"token\":\" myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]},{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]},{\"token\":\" what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]},{\"token\":\" a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]},{\"token\":\" wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]},{\"token\":\" world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]},{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}],\"usage\":{\"input_tokens\":14,\"input_token_details\":{\"text_tokens\":0,\"audio_tokens\":14},\"output_tokens\":45,\"total_tokens\":59}} \n```\n\n### Create transcription\n\n```\ncurl https://api.openai.com/v1/audio/transcriptions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: multipart/form-data\" \\ -F file=\"@/path/to/file/audio.mp3\" \\ -F \"timestamp_granularities[]=word\" \\ -F model=\"whisper-1\" \\ -F response_format=\"verbose_json\" \n```\n\n```\n{ \"task\": \"transcribe\", \"language\": \"english\", \"duration\": 8.470000267028809, \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\", \"words\": [ { \"word\": \"The\", \"start\": 0.0, \"end\": 0.23999999463558197 }, ... { \"word\": \"volleyball\", \"start\": 7.400000095367432, \"end\": 7.900000095367432 } ], \"usage\": { \"type\": \"duration\", \"seconds\": 9 } } \n```\n\n##### Returns Examples\n\n```\n{ \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\", \"usage\": { \"type\": \"tokens\", \"input_tokens\": 14, \"input_token_details\": { \"text_tokens\": 0, \"audio_tokens\": 14 }, \"output_tokens\": 45, \"total_tokens\": 59 } } \n```", "znaku_textu": 25084, "slov": 2675, "odkazu": 485, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:02", "sha256": "33ebe0fcc131ae5aaa610196e59a64bfbdae1132e64a74d40efd98d38bdf39d7", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events", "https://en.wikipedia.org/wiki/Log_probability"]} {"url": "https://developers.openai.com/api/docs/api-reference/audio/transcript-text-delta-event", "titulek": "Audio | OpenAI API Reference", "h1": "Audio", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/audio/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Audio", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/audio/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioModel = \"whisper-1\" or \"gpt-transcribe\" or \"gpt-4o-transcribe\" or 3 moreOne of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-4o-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe-diarize\"\n\nAudioResponseFormat = \"json\" or \"text\" or \"srt\" or 3 moreThe format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.One of the following:\"json\"\"text\"\"srt\"\"verbose_json\"\"vtt\"\"diarized_json\"\n\n##### ModelsExpand Collapse\n\nSpeechModel = \"tts-1\" or \"tts-1-hd\" or \"gpt-4o-mini-tts\" or \"gpt-4o-mini-tts-2025-12-15\"One of the following:\"tts-1\"\"tts-1-hd\"\"gpt-4o-mini-tts\"\"gpt-4o-mini-tts-2025-12-15\"\n\n##### ModelsExpand Collapse\n\nTranscription object { text, languages, logprobs, usage } Represents a transcription response returned by model, based on the provided input.text: stringThe transcribed text.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.token: optional stringThe token in the transcription.bytes: optional array of numberThe bytes of the token.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.\n\nTranscriptionCreateResponse = [Transcription](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription%20%3E%20(schema)) { text, languages, logprobs, usage } or [TranscriptionDiarized](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_diarized%20%3E%20(schema)) { duration, segments, task, 2 more } or [TranscriptionVerbose](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_verbose%20%3E%20(schema)) { duration, language, text, 3 more } Represents a transcription response returned by model, based on the provided input.One of the following:Transcription object { text, languages, logprobs, usage } Represents a transcription response returned by model, based on the provided input.text: stringThe transcribed text.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.token: optional stringThe token in the transcription.bytes: optional array of numberThe bytes of the token.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.TranscriptionDiarized object { duration, segments, task, 2 more } Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.duration: numberDuration of the input audio in seconds.formatdoublesegments: array of [TranscriptionDiarizedSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_diarized_segment%20%3E%20(schema)) { id, end, speaker, 3 more } Segments of the transcript annotated with timestamps and speaker labels.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, …).start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the segment. Always `transcript.text.segment`.task: \"transcribe\"The type of task that was run. Always `transcribe`.text: stringThe concatenated transcript text for the entire audio input.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token or duration usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.TranscriptionVerbose object { duration, language, text, 3 more } Represents a verbose json transcription response returned by model, based on the provided input.duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the input audio.text: stringThe transcribed text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the transcribed text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.usage: optional object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.words: optional array of [TranscriptionWord](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_word%20%3E%20(schema)) { end, start, word } Extracted words and their corresponding timestamps.end: numberEnd time of the word in seconds.formatdoublestart: numberStart time of the word in seconds.formatdoubleword: stringThe text content of the word.\n\nTranscriptionDiarized object { duration, segments, task, 2 more } Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.duration: numberDuration of the input audio in seconds.formatdoublesegments: array of [TranscriptionDiarizedSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_diarized_segment%20%3E%20(schema)) { id, end, speaker, 3 more } Segments of the transcript annotated with timestamps and speaker labels.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, …).start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the segment. Always `transcript.text.segment`.task: \"transcribe\"The type of task that was run. Always `transcribe`.text: stringThe concatenated transcript text for the entire audio input.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Token or duration usage statistics for the request.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.\n\nTranscriptionDiarizedSegment object { id, end, speaker, 3 more } A segment of diarized transcript text with speaker metadata.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, …).start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the segment. Always `transcript.text.segment`.\n\nTranscriptionInclude = \"logprobs\"\n\nTranscriptionLanguage object { code } A language detected in transcribed audio.code: stringThe code of a language detected in the audio.\n\nTranscriptionSegment object { id, avg_logprob, compression_ratio, 7 more } id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.\n\nTranscriptionStreamEvent = [TranscriptionTextSegmentEvent](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_text_segment_event%20%3E%20(schema)) { id, end, speaker, 3 more } or [TranscriptionTextDeltaEvent](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_text_delta_event%20%3E%20(schema)) { delta, type, logprobs, segment_id } or [TranscriptionTextDoneEvent](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_text_done_event%20%3E%20(schema)) { text, type, languages, 2 more } Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.One of the following:TranscriptionTextSegmentEvent object { id, end, speaker, 3 more } Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment.start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the event. Always `transcript.text.segment`.TranscriptionTextDeltaEvent object { delta, type, logprobs, segment_id } Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.delta: stringThe text delta that was additionally transcribed.type: \"transcript.text.delta\"The type of the event. Always `transcript.text.delta`.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the delta. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.segment_id: optional stringIdentifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`.TranscriptionTextDoneEvent object { text, type, languages, 2 more } Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.text: stringThe text that was transcribed.type: \"transcript.text.done\"The type of the event. Always `transcript.text.done`.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.\n\nTranscriptionTextDeltaEvent object { delta, type, logprobs, segment_id } Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.delta: stringThe text delta that was additionally transcribed.type: \"transcript.text.delta\"The type of the event. Always `transcript.text.delta`.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the delta. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.segment_id: optional stringIdentifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`.\n\nTranscriptionTextDoneEvent object { text, type, languages, 2 more } Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.text: stringThe text that was transcribed.type: \"transcript.text.done\"The type of the event. Always `transcript.text.done`.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of object { token, bytes, logprob } The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.token: optional stringThe token that was used to generate the log probability.bytes: optional array of numberThe bytes that were used to generate the log probability.logprob: optional numberThe log probability of the token.usage: optional object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.\n\nTranscriptionTextSegmentEvent object { id, end, speaker, 3 more } Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.id: stringUnique identifier for the segment.end: numberEnd timestamp of the segment in seconds.formatdoublespeaker: stringSpeaker label for this segment.start: numberStart timestamp of the segment in seconds.formatdoubletext: stringTranscript text for this segment.type: \"transcript.text.segment\"The type of the event. Always `transcript.text.segment`.\n\nTranscriptionVerbose object { duration, language, text, 3 more } Represents a verbose json transcription response returned by model, based on the provided input.duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the input audio.text: stringThe transcribed text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the transcribed text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.usage: optional object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.words: optional array of [TranscriptionWord](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_word%20%3E%20(schema)) { end, start, word } Extracted words and their corresponding timestamps.end: numberEnd time of the word in seconds.formatdoublestart: numberStart time of the word in seconds.formatdoubleword: stringThe text content of the word.\n\nTranscriptionWord object { end, start, word } end: numberEnd time of the word in seconds.formatdoublestart: numberStart time of the word in seconds.formatdoubleword: stringThe text content of the word.\n\n##### ModelsExpand Collapse\n\nTranslation object { text } text: string\n\nTranslationCreateResponse = [Translation](/api/reference/resources/audio#(resource)%20audio.translations%20%3E%20(model)%20translation%20%3E%20(schema)) { text } or [TranslationVerbose](/api/reference/resources/audio#(resource)%20audio.translations%20%3E%20(model)%20translation_verbose%20%3E%20(schema)) { duration, language, text, segments } One of the following:Translation object { text } text: stringTranslationVerbose object { duration, language, text, segments } duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the output translation (always `english`).text: stringThe translated text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the translated text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.\n\nTranslationVerbose object { duration, language, text, segments } duration: numberThe duration of the input audio.formatdoublelanguage: stringThe language of the output translation (always `english`).text: stringThe translated text.segments: optional array of [TranscriptionSegment](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_segment%20%3E%20(schema)) { id, avg_logprob, compression_ratio, 7 more } Segments of the translated text and their corresponding details.id: numberUnique identifier of the segment.avg_logprob: numberAverage logprob of the segment. If the value is lower than -1, consider the logprobs failed.formatfloatcompression_ratio: numberCompression ratio of the segment. If the value is greater than 2.4, consider the compression failed.formatfloatend: numberEnd time of the segment in seconds.formatdoubleno_speech_prob: numberProbability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.formatfloatseek: numberSeek offset of the segment.start: numberStart time of the segment in seconds.formatdoubletemperature: numberTemperature parameter used for generating the segment.formatfloattext: stringText content of the segment.tokens: array of numberArray of token IDs for the text content.\n\n##### ModelsExpand Collapse\n\n##### ModelsExpand Collapse\n\nVoiceCreateResponse object { id, created_at, name, object } A custom voice that can be used for audio output.id: stringThe voice identifier, which can be referenced in API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the voice was created.formatunixtimename: stringThe name of the voice.object: \"audio.voice\"The object type, which is always `audio.voice`.", "znaku_textu": 28257, "slov": 3305, "odkazu": 544, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/audio", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:06", "sha256": "c9a6cffd9d035f6d4a2a66098be0799687bb130f16f206cb01b68508bc2ca1f4", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/authentication", "titulek": "API Overview | OpenAI API Reference", "h1": "API Overview", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/overview/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "API Overview", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/overview/", "og:locale": "en", "og:site_name": "OpenAI API Reference", "og:image": "https://developers.openai.com/og/api/reference/overview.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 1, "text": "API Overview"}, {"uroven": 2, "text": "Start here"}, {"uroven": 2, "text": "Authentication"}, {"uroven": 2, "text": "Request headers"}, {"uroven": 2, "text": "Debugging requests"}, {"uroven": 3, "text": "Supplying your own request ID with X-Client-Request-Id"}, {"uroven": 2, "text": "Backwards compatibility"}], "markdown": "# API Overview\n\nUse this reference to look up OpenAI API endpoints, request and response\nschemas, streaming events, client library methods, and shared behavior such as\nauthentication, errors, rate limits, and request IDs.\n\n## Start here\n\nSection titled “Start here”\n\n1. Choose the API surface for your application:\n - [Responses](/api/reference/responses/overview) for direct model requests, tool use, audio, image, and text inputs, and stateful interactions.\n - [Realtime API](/api/docs/guides/realtime) for low-latency voice or audio sessions over WebRTC, WebSocket, or SIP. Use the [client events](/api/reference/resources/realtime/client-events) and [server events](/api/reference/resources/realtime/server-events) references while building sessions.\n - [Administration](/api/reference/administration/overview) for organization workflows such as users, invites, projects, API keys, and audit logs.\n2. Create credentials. Use a standard [API key](https://platform.openai.com/settings/organization/api-keys) for application requests, an [Admin API key](https://platform.openai.com/settings/organization/admin-keys) for Administration endpoints, or [workload identity federation](/api/docs/guides/workload-identity-federation) for short-lived access tokens.\n3. Install an official client library from the [libraries page](/api/docs/libraries) , or call the HTTP API directly from any environment that supports HTTP requests.\n4. Make a first request with the [developer quickstart](/api/docs/quickstart) or go straight to the [Responses create reference](/api/reference/resources/responses/methods/create) .\n5. Before production, review [error codes](/api/docs/guides/error-codes) , [rate limits](/api/docs/guides/rate-limits) , and request ID logging below.\n\n## Authentication\n\nSection titled “Authentication”\n\nThe OpenAI API accepts bearer credentials from API keys or from short-lived access tokens created with [workload identity federation](/api/docs/guides/workload-identity-federation).\n\n**Remember that your API key is a secret.** Don’t share it with others or expose it in any client-side code such as browsers or apps. Load API keys from an environment variable or key management service on the server.\n\nRevocations of an API key take effect within a few seconds. Most updates that\naffect authentication results of an API key propagate within 15 minutes, but\ncan potentially take longer.\n\nProvide API credentials with [HTTP Bearer authentication](https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/).\n\n```\nAuthorization: Bearer OPENAI_API_KEY_OR_ACCESS_TOKEN\n```\n\nIf you belong to more than one organization or access projects through a legacy user API key, pass a header to specify which organization and project to use for an API request:\n\n```\ncurl https://api.openai.com/v1/models \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"OpenAI-Organization: $ORGANIZATION_ID\" \\ -H \"OpenAI-Project: $PROJECT_ID\"\n```\n\nUsage from these API requests counts as usage for the specified organization and project. Find organization and project IDs in your [dashboard settings](https://platform.openai.com/settings/organization/general).\n\n## Request headers\n\nSection titled “Request headers”\n\nFor reliable behavior across API paths and HTTP versions, keep the total size\nof an API request’s headers under 64 KiB. This budget includes the names and\nvalues of all headers, including common headers such as `Authorization`,\n`Content-Type`, and `User-Agent`, as well as any custom headers.\n\nTo leave room for required headers and headers added by intermediaries, keep\nany individual custom header value and the total size of all custom header\nvalues at 60 KiB or less. Requests with larger headers may fail before they\nreach the API, so you may not receive a response or an `x-request-id`.\n\n## Debugging requests\n\nSection titled “Debugging requests”\n\n[Error codes](/api/docs/guides/error-codes) describe failures returned from API responses. Inspect HTTP response headers for the unique ID of a request and rate limit details. Common response headers include:\n\n**API meta information**\n\n- `openai-organization` : The [organization](/api/docs/guides/production-best-practices#setting-up-your-organization) associated with the request\n- `openai-processing-ms` : Time taken processing your API request\n- `openai-version` : REST API version used for this request (currently `2020-10-01` )\n- `x-request-id` : Unique identifier for this API request (used in troubleshooting)\n\n**[Rate limiting information](/api/docs/guides/rate-limits)**\n\n- `x-ratelimit-limit-requests`\n- `x-ratelimit-limit-tokens`\n- `x-ratelimit-remaining-requests`\n- `x-ratelimit-remaining-tokens`\n- `x-ratelimit-reset-requests`\n- `x-ratelimit-reset-tokens`\n- `x-ratelimit-limit-project-tokens`\n- `x-ratelimit-remaining-project-tokens`\n- `x-ratelimit-reset-project-tokens`\n\nProject-token headers may be present when a project-scoped token limit applies.\n\n**OpenAI recommends logging request IDs in production deployments** for more efficient troubleshooting with the [support team](https://help.openai.com/en/), should the need arise. Official [client libraries](/api/docs/libraries) provide a property on top-level response objects containing the value of the `x-request-id` header.\n\n### Supplying your own request ID with `X-Client-Request-Id`\n\nSection titled “Supplying your own request ID with X-Client-Request-Id”\n\nAlong with the server-generated `x-request-id`, you can supply your own unique identifier for each request via the `X-Client-Request-Id` request header. This header isn’t added automatically; you must explicitly set it on the request.\n\nWhen you include `X-Client-Request-Id`:\n\n- You control the ID format (for example, a UUID or your internal trace ID), but it must contain only ASCII characters and be no more than 512 characters long; otherwise, the request will fail with a 400 error. Make this value unique per request.\n- OpenAI logs this value internally for supported endpoints, including chat/completions, embeddings, responses, and more.\n- In cases like timeouts or network issues when you can’t get the `X-Request-Id` response header, you can share the `X-Client-Request-Id` value with the support team to look up whether OpenAI received the request and when.\n\n**Example:**\n\n```\ncurl https://api.openai.com/v1/chat/completions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"X-Client-Request-Id: 123e4567-e89b-12d3-a456-426614174000\"\n```\n\n## Backwards compatibility\n\nSection titled “Backwards compatibility”\n\nOpenAI provides stability to API users by avoiding breaking changes in major API versions whenever reasonably possible. This includes:\n\n- The REST API (currently `v1` )\n- First-party [client libraries](/api/docs/libraries) (released libraries adhere to [semantic versioning](https://semver.org/) )\n- [Model](/api/docs/models) families (like `gpt-4o` or `o4-mini` )\n\n**Model prompting behavior between snapshots is subject to change**.\nModel outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run [evals](/api/docs/guides/evals) for your applications.\n\n**Backwards-compatible API changes**:\n\n- Adding new resources (URLs) to the REST API and client libraries\n- Adding new optional API parameters\n- Adding new properties to JSON response objects or event data\n- Changing the order of properties in a JSON response object\n- Changing the length or format of opaque strings, like resource identifiers\n- Adding new event types in streaming APIs\n\nSee the [changelog](/api/docs/changelog) for a list of backwards-compatible changes and rare breaking changes.", "znaku_textu": 7584, "slov": 1031, "odkazu": 390, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:51:55", "sha256": "5c877cb85fb6b9ce2017b7045cd56125a1316ccb8aa9cec8e3274a7eaf51d57c", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://platform.openai.com/settings/organization/api-keys", "https://platform.openai.com/settings/organization/admin-keys", "https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/", "https://platform.openai.com/settings/organization/general", "https://help.openai.com/en/", "https://semver.org/"]} {"url": "https://developers.openai.com/api/docs/api-reference/batch", "titulek": "Batches | OpenAI API Reference", "h1": "Batches", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/batches/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Batches", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/batches/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nBatch object { id, completion_window, created_at, 19 more } id: stringcompletion_window: stringThe time frame within which the batch should be processed.created_at: numberThe Unix timestamp (in seconds) for when the batch was created.formatunixtimeendpoint: stringThe OpenAI API endpoint used by the batch.input_file_id: stringThe ID of the input file for the batch.object: \"batch\"The object type, which is always `batch`.status: \"validating\" or \"failed\" or \"in_progress\" or 5 moreThe current status of the batch.One of the following:\"validating\"\"failed\"\"in_progress\"\"finalizing\"\"completed\"\"expired\"\"cancelling\"\"cancelled\"cancelled_at: optional numberThe Unix timestamp (in seconds) for when the batch was cancelled.formatunixtimecancelling_at: optional numberThe Unix timestamp (in seconds) for when the batch started cancelling.formatunixtimecompleted_at: optional numberThe Unix timestamp (in seconds) for when the batch was completed.formatunixtimeerror_file_id: optional stringThe ID of the file containing the outputs of requests with errors.errors: optional object { data, object } data: optional array of [BatchError](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_error%20%3E%20(schema)) { code, line, message, param } code: optional stringAn error code identifying the error type.line: optional number or nullThe line number of the input file where the error occurred, if applicable.message: optional stringA human-readable message providing more details about the error.param: optional string or nullThe name of the parameter that caused the error, if applicable.object: optional stringThe object type, which is always `list`.expired_at: optional numberThe Unix timestamp (in seconds) for when the batch expired.formatunixtimeexpires_at: optional numberThe Unix timestamp (in seconds) for when the batch will expire.formatunixtimefailed_at: optional numberThe Unix timestamp (in seconds) for when the batch failed.formatunixtimefinalizing_at: optional numberThe Unix timestamp (in seconds) for when the batch started finalizing.formatunixtimein_progress_at: optional numberThe Unix timestamp (in seconds) for when the batch started processing.formatunixtimemetadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional stringModel ID used to process the batch, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model\nguide](/api/docs/models) to browse and compare available models.output_file_id: optional stringThe ID of the file containing the outputs of successfully executed requests.request_counts: optional [BatchRequestCounts](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_request_counts%20%3E%20(schema)) { completed, failed, total } The request counts for different statuses within the batch.usage: optional [BatchUsage](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_usage%20%3E%20(schema)) { input_tokens, input_tokens_details, output_tokens, 2 more } Represents token usage details including input tokens, output tokens, a\nbreakdown of output tokens, and the total tokens used. Only populated on\nbatches created after September 7, 2025.\n\nBatchError object { code, line, message, param } code: optional stringAn error code identifying the error type.line: optional number or nullThe line number of the input file where the error occurred, if applicable.message: optional stringA human-readable message providing more details about the error.param: optional string or nullThe name of the parameter that caused the error, if applicable.\n\nBatchRequestCounts object { completed, failed, total } The request counts for different statuses within the batch.completed: numberNumber of requests that have been completed successfully.failed: numberNumber of requests that have failed.total: numberTotal number of requests in the batch.\n\nBatchUsage object { input_tokens, input_tokens_details, output_tokens, 2 more } Represents token usage details including input tokens, output tokens, a\nbreakdown of output tokens, and the total tokens used. Only populated on\nbatches created after September 7, 2025.input_tokens: numberThe number of input tokens.input_tokens_details: object { cached_tokens } A detailed breakdown of the input tokens.cached_tokens: numberThe number of tokens that were retrieved from the cache. [More on\nprompt caching](/api/docs/guides/prompt-caching).output_tokens: numberThe number of output tokens.output_tokens_details: object { reasoning_tokens } A detailed breakdown of the output tokens.reasoning_tokens: numberThe number of reasoning tokens.total_tokens: numberThe total number of tokens used.", "znaku_textu": 5156, "slov": 617, "odkazu": 424, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:53:46", "sha256": "c9e0d0907af8b832af4ed8bc62674e3256ce4bffcdadae8c06128e387833a2ac", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/batch/create", "titulek": "Create batch | OpenAI API Reference", "h1": "Create batch", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/batches/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create batch", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/batches/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Batches"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create batch"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Creates and executes a batch from an uploaded file of requests\n\n##### Body ParametersJSONExpand Collapse\n\ncompletion_window : \"24h\"\n\nThe time frame within which the batch should be processed. Currently only `24h` is supported.\n\nendpoint: \"/v1/responses\" or \"/v1/chat/completions\" or \"/v1/embeddings\" or 5 moreThe endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and `/v1/videos` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.One of the following:\"/v1/responses\"\"/v1/chat/completions\"\"/v1/embeddings\"\"/v1/completions\"\"/v1/moderations\"\"/v1/images/generations\"\"/v1/images/edits\"\"/v1/videos\"\n\ninput_file_id : string\n\nThe ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/api/reference/resources/files/methods/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n\nmetadata : optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or null\n\nSet 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\noutput_expires_after: optional object { anchor, seconds } The expiration policy for the output and/or error file that are generated for a batch.anchor: \"created_at\"Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`. Note that the anchor is the file creation time, not the time the batch is created.seconds: numberThe number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).formatint64minimum3600maximum2592000\n\n##### ReturnsExpand Collapse\n\nBatch object { id, completion_window, created_at, 19 more } id: stringcompletion_window: stringThe time frame within which the batch should be processed.created_at: numberThe Unix timestamp (in seconds) for when the batch was created.formatunixtimeendpoint: stringThe OpenAI API endpoint used by the batch.input_file_id: stringThe ID of the input file for the batch.object: \"batch\"The object type, which is always `batch`.status: \"validating\" or \"failed\" or \"in_progress\" or 5 moreThe current status of the batch.One of the following:\"validating\"\"failed\"\"in_progress\"\"finalizing\"\"completed\"\"expired\"\"cancelling\"\"cancelled\"cancelled_at: optional numberThe Unix timestamp (in seconds) for when the batch was cancelled.formatunixtimecancelling_at: optional numberThe Unix timestamp (in seconds) for when the batch started cancelling.formatunixtimecompleted_at: optional numberThe Unix timestamp (in seconds) for when the batch was completed.formatunixtimeerror_file_id: optional stringThe ID of the file containing the outputs of requests with errors.errors: optional object { data, object } data: optional array of [BatchError](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_error%20%3E%20(schema)) { code, line, message, param } code: optional stringAn error code identifying the error type.line: optional number or nullThe line number of the input file where the error occurred, if applicable.message: optional stringA human-readable message providing more details about the error.param: optional string or nullThe name of the parameter that caused the error, if applicable.object: optional stringThe object type, which is always `list`.expired_at: optional numberThe Unix timestamp (in seconds) for when the batch expired.formatunixtimeexpires_at: optional numberThe Unix timestamp (in seconds) for when the batch will expire.formatunixtimefailed_at: optional numberThe Unix timestamp (in seconds) for when the batch failed.formatunixtimefinalizing_at: optional numberThe Unix timestamp (in seconds) for when the batch started finalizing.formatunixtimein_progress_at: optional numberThe Unix timestamp (in seconds) for when the batch started processing.formatunixtimemetadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional stringModel ID used to process the batch, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model\nguide](/api/docs/models) to browse and compare available models.output_file_id: optional stringThe ID of the file containing the outputs of successfully executed requests.request_counts: optional [BatchRequestCounts](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_request_counts%20%3E%20(schema)) { completed, failed, total } The request counts for different statuses within the batch.completed: numberNumber of requests that have been completed successfully.failed: numberNumber of requests that have failed.total: numberTotal number of requests in the batch.usage: optional [BatchUsage](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_usage%20%3E%20(schema)) { input_tokens, input_tokens_details, output_tokens, 2 more } Represents token usage details including input tokens, output tokens, a\nbreakdown of output tokens, and the total tokens used. Only populated on\nbatches created after September 7, 2025.input_tokens: numberThe number of input tokens.input_tokens_details: object { cached_tokens } A detailed breakdown of the input tokens.cached_tokens: numberThe number of tokens that were retrieved from the cache. [More on\nprompt caching](/api/docs/guides/prompt-caching).output_tokens: numberThe number of output tokens.output_tokens_details: object { reasoning_tokens } A detailed breakdown of the output tokens.reasoning_tokens: numberThe number of reasoning tokens.total_tokens: numberThe total number of tokens used.\n\n### Create batch\n\n```\ncurl https://api.openai.com/v1/batches \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"input_file_id\": \"file-abc123\", \"endpoint\": \"/v1/chat/completions\", \"completion_window\": \"24h\" }' \n```\n\n```\n{ \"id\": \"batch_abc123\", \"object\": \"batch\", \"endpoint\": \"/v1/chat/completions\", \"errors\": null, \"input_file_id\": \"file-abc123\", \"completion_window\": \"24h\", \"status\": \"validating\", \"output_file_id\": null, \"error_file_id\": null, \"created_at\": 1711471533, \"in_progress_at\": null, \"expires_at\": null, \"finalizing_at\": null, \"completed_at\": null, \"failed_at\": null, \"expired_at\": null, \"cancelling_at\": null, \"cancelled_at\": null, \"request_counts\": { \"total\": 0, \"completed\": 0, \"failed\": 0 }, \"metadata\": { \"customer_id\": \"user_123456789\", \"batch_description\": \"Nightly eval job\", } } \n```\n\n##### Returns Examples\n\n```\n{ \"id\": \"batch_abc123\", \"object\": \"batch\", \"endpoint\": \"/v1/chat/completions\", \"errors\": null, \"input_file_id\": \"file-abc123\", \"completion_window\": \"24h\", \"status\": \"validating\", \"output_file_id\": null, \"error_file_id\": null, \"created_at\": 1711471533, \"in_progress_at\": null, \"expires_at\": null, \"finalizing_at\": null, \"completed_at\": null, \"failed_at\": null, \"expired_at\": null, \"cancelling_at\": null, \"cancelled_at\": null, \"request_counts\": { \"total\": 0, \"completed\": 0, \"failed\": 0 }, \"metadata\": { \"customer_id\": \"user_123456789\", \"batch_description\": \"Nightly eval job\", } } \n```", "znaku_textu": 8014, "slov": 943, "odkazu": 438, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:46", "sha256": "3a98b2edf40f607b0149beda29de2144adba7e68739b822decd992152a9ae14a", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/batch/object", "titulek": "Batches | OpenAI API Reference", "h1": "Batches", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/batches/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Batches", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/batches/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nBatch object { id, completion_window, created_at, 19 more } id: stringcompletion_window: stringThe time frame within which the batch should be processed.created_at: numberThe Unix timestamp (in seconds) for when the batch was created.formatunixtimeendpoint: stringThe OpenAI API endpoint used by the batch.input_file_id: stringThe ID of the input file for the batch.object: \"batch\"The object type, which is always `batch`.status: \"validating\" or \"failed\" or \"in_progress\" or 5 moreThe current status of the batch.One of the following:\"validating\"\"failed\"\"in_progress\"\"finalizing\"\"completed\"\"expired\"\"cancelling\"\"cancelled\"cancelled_at: optional numberThe Unix timestamp (in seconds) for when the batch was cancelled.formatunixtimecancelling_at: optional numberThe Unix timestamp (in seconds) for when the batch started cancelling.formatunixtimecompleted_at: optional numberThe Unix timestamp (in seconds) for when the batch was completed.formatunixtimeerror_file_id: optional stringThe ID of the file containing the outputs of requests with errors.errors: optional object { data, object } data: optional array of [BatchError](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_error%20%3E%20(schema)) { code, line, message, param } code: optional stringAn error code identifying the error type.line: optional number or nullThe line number of the input file where the error occurred, if applicable.message: optional stringA human-readable message providing more details about the error.param: optional string or nullThe name of the parameter that caused the error, if applicable.object: optional stringThe object type, which is always `list`.expired_at: optional numberThe Unix timestamp (in seconds) for when the batch expired.formatunixtimeexpires_at: optional numberThe Unix timestamp (in seconds) for when the batch will expire.formatunixtimefailed_at: optional numberThe Unix timestamp (in seconds) for when the batch failed.formatunixtimefinalizing_at: optional numberThe Unix timestamp (in seconds) for when the batch started finalizing.formatunixtimein_progress_at: optional numberThe Unix timestamp (in seconds) for when the batch started processing.formatunixtimemetadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional stringModel ID used to process the batch, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model\nguide](/api/docs/models) to browse and compare available models.output_file_id: optional stringThe ID of the file containing the outputs of successfully executed requests.request_counts: optional [BatchRequestCounts](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_request_counts%20%3E%20(schema)) { completed, failed, total } The request counts for different statuses within the batch.usage: optional [BatchUsage](/api/reference/resources/batches#(resource)%20batches%20%3E%20(model)%20batch_usage%20%3E%20(schema)) { input_tokens, input_tokens_details, output_tokens, 2 more } Represents token usage details including input tokens, output tokens, a\nbreakdown of output tokens, and the total tokens used. Only populated on\nbatches created after September 7, 2025.\n\nBatchError object { code, line, message, param } code: optional stringAn error code identifying the error type.line: optional number or nullThe line number of the input file where the error occurred, if applicable.message: optional stringA human-readable message providing more details about the error.param: optional string or nullThe name of the parameter that caused the error, if applicable.\n\nBatchRequestCounts object { completed, failed, total } The request counts for different statuses within the batch.completed: numberNumber of requests that have been completed successfully.failed: numberNumber of requests that have failed.total: numberTotal number of requests in the batch.\n\nBatchUsage object { input_tokens, input_tokens_details, output_tokens, 2 more } Represents token usage details including input tokens, output tokens, a\nbreakdown of output tokens, and the total tokens used. Only populated on\nbatches created after September 7, 2025.input_tokens: numberThe number of input tokens.input_tokens_details: object { cached_tokens } A detailed breakdown of the input tokens.cached_tokens: numberThe number of tokens that were retrieved from the cache. [More on\nprompt caching](/api/docs/guides/prompt-caching).output_tokens: numberThe number of output tokens.output_tokens_details: object { reasoning_tokens } A detailed breakdown of the output tokens.reasoning_tokens: numberThe number of reasoning tokens.total_tokens: numberThe total number of tokens used.", "znaku_textu": 5156, "slov": 617, "odkazu": 424, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/batch", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:53:53", "sha256": "c9e0d0907af8b832af4ed8bc62674e3256ce4bffcdadae8c06128e387833a2ac", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/chat", "titulek": "Chat | OpenAI API Reference", "h1": "Chat", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/chat/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Chat", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/chat/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nChatCompletionAllowedTools object { mode, tools } Constrains the tools available to the model to a pre-defined set.mode: \"auto\" or \"required\"Constrains the tools available to the model to a pre-defined set. `auto` allows the model to pick from among the allowed tools and generate a\nmessage. `required` requires the model to call one or more of the allowed tools.One of the following:\"auto\"\"required\"tools: array of map[unknown]A list of tool definitions that the model should be allowed to call. For the Chat Completions API, the list of tool definitions might look like: `[ { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } }, { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } } ]`\n\nChatCompletion object { id, choices, created, 7 more } Represents a chat completion response returned by model, based on the provided input.id: stringA unique identifier for the chat completion.choices: array of object { finish_reason, index, logprobs, message } A list of chat completion choices. Can be more than one if `n` is greater than 1.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 moreThe 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.\nRead the [Model Spec](https://model-spec.openai.com/2025-12-18.html) for more.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.message: [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.created: numberThe Unix timestamp (in seconds) of when the chat completion was created.formatunixtimemodel: stringThe model used for the chat completion.object: \"chat.completion\"The object type, which is always `chat.completion`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.moderation: optional object { input, output } or nullModeration results for the request input and generated output, if moderated\ncompletions were requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.\n\nChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.\n\nChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionAudio object { id, data, expires_at, transcript } If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).id: stringUnique identifier for this audio response.data: stringBase64 encoded audio bytes generated by the model, in the format\nspecified in the request.expires_at: numberThe Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.formatunixtimetranscript: stringTranscript of the audio generated by the model.\n\nChatCompletionAudioParam object { format, voice } Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](/api/docs/guides/audio).format: \"wav\" or \"aac\" or \"mp3\" or 3 moreSpecifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.One of the following:\"wav\"\"aac\"\"mp3\"\"flac\"\"opus\"\"pcm16\"voice: string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } 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\" }`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nChatCompletionChunk object { id, choices, created, 7 more } Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input.\n[Learn more](/api/docs/guides/streaming-responses).id: stringA unique identifier for the chat completion. Each chunk has the same ID.choices: array of object { delta, finish_reason, index, logprobs } 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}`.delta: object { content, function_call, refusal, 2 more } A chat completion delta generated by streamed model responses.content: optional string or nullThe contents of the chunk message.Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: optional stringThe 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.name: optional stringThe name of the function to call.refusal: optional string or nullThe refusal message generated by the model.role: optional \"developer\" or \"system\" or \"user\" or 2 moreThe role of the author of this message.One of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"tool_calls: optional array of object { index, id, function, type } index: numberid: optional stringThe ID of the tool call.function: optional object { arguments, name } arguments: optional stringThe 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.name: optional stringThe name of the function to call.type: optional \"function\"The type of the tool. Currently, only `function` is supported.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 more or nullThe 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.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: optional object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.created: numberThe Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.formatunixtimemodel: stringThe model to generate the completion.object: \"chat.completion.chunk\"The object type, which is always `chat.completion.chunk`.moderation: optional object { input, output } or nullModeration results for the request input and generated output. Present\non the moderation chunk when moderated completions are requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.obfuscation: optional stringAn obfuscation string added to normalize the size of streamed chunks as a\nmitigation to certain side-channel attacks. The field is included by\ndefault and omitted when `stream_options.include_obfuscation` is `false`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis 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.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } or nullAn 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. **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\nChatCompletionContentPart = [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or [ChatCompletionContentPartInputAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_input_audio%20%3E%20(schema)) { input_audio, type, prompt_cache_breakpoint } or object { file, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.\n\nChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionDeleted object { id, deleted, object } id: stringThe ID of the chat completion that was deleted.deleted: booleanWhether the chat completion was deleted.object: \"chat.completion.deleted\"The type of object being deleted.\n\nChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionFunctionCallOption object { name } Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.name: stringThe name of the function to call.\n\nChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessage object { content, refusal, role, 4 more } A chat completion message generated by the model.content: string or nullThe contents of the message.refusal: string or nullThe refusal message generated by the model.role: \"assistant\"The role of the author of this message.annotations: optional array of object { type, url_citation } Annotations for the message, when applicable, as when using the\n[web search tool](/api/docs/guides/tools-web-search).type: \"url_citation\"The type of the URL citation. Always `url_citation`.url_citation: object { end_index, start_index, title, url } A URL citation when using web search.end_index: numberThe index of the last character of the URL citation in the message.start_index: numberThe index of the first character of the URL citation in the message.title: stringThe title of the web resource.url: stringThe URL of the web resource.formaturiaudio: optional [ChatCompletionAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_audio%20%3E%20(schema)) { id, data, expires_at, transcript } or nullIf the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessageParam = [ChatCompletionDeveloperMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_developer_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionSystemMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_system_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionUserMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_user_message_param%20%3E%20(schema)) { content, role, name } or 3 moreDeveloper-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.One of the following:ChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.ChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.ChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionMessageToolCall = [ChatCompletionMessageFunctionToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_function_tool_call%20%3E%20(schema)) { id, function, type } or [ChatCompletionMessageCustomToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_custom_tool_call%20%3E%20(schema)) { id, custom, type } A call to a function tool created by the model.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionModality = \"text\" or \"audio\"One of the following:\"text\"\"audio\"\n\nChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.\n\nChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionPredictionContent object { content, type } Static predicted output content, such as the content of a text file that is\nbeing regenerated.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextContent = stringThe content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text inputs.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.type: \"content\"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n\nChatCompletionRole = \"developer\" or \"system\" or \"user\" or 3 moreThe role of the author of a messageOne of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"\"function\"\n\nChatCompletionStoreMessage = [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.id: stringThe identifier of the chat message.content_parts: optional array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or nullIf a content parts array was provided, this is an array of `text` and `image_url` parts.\nOtherwise, null.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionStreamOptions object { include_obfuscation, include_usage } Options for streaming response. Only set this when you set `stream: true`.include_obfuscation: optional booleanWhen 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.include_usage: optional booleanIf 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. All 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\nChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionTokenLogprob object { token, bytes, logprob, top_logprobs } token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.\n\nChatCompletionTool = [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } or [ChatCompletionCustomTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_custom_tool%20%3E%20(schema)) { custom, type } A function tool that can be used to generate a response.One of the following:ChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionToolChoiceOption = \"none\" or \"auto\" or \"required\" or [ChatCompletionAllowedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_allowed_tool_choice%20%3E%20(schema)) { allowed_tools, type } or [ChatCompletionNamedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice%20%3E%20(schema)) { function, type } or [ChatCompletionNamedToolChoiceCustom](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice_custom%20%3E%20(schema)) { custom, type } 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. `none` is the default when no tools are present. `auto` is the default if tools are present.One of the following:ToolChoiceMode = \"none\" or \"auto\" or \"required\"`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.One of the following:\"none\"\"auto\"\"required\"ChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.ChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.\n\nChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.", "znaku_textu": 73734, "slov": 9271, "odkazu": 752, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:53:47", "sha256": "495da05a2ea59639b42f90b47583968c2e8392bb8117b856d37a15ddc9ea589f", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://model-spec.openai.com/2025-12-18.html"]} {"url": "https://developers.openai.com/api/docs/api-reference/chat/", "titulek": "Chat | OpenAI API Reference", "h1": "Chat", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/chat/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Chat", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/chat/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nChatCompletionAllowedTools object { mode, tools } Constrains the tools available to the model to a pre-defined set.mode: \"auto\" or \"required\"Constrains the tools available to the model to a pre-defined set. `auto` allows the model to pick from among the allowed tools and generate a\nmessage. `required` requires the model to call one or more of the allowed tools.One of the following:\"auto\"\"required\"tools: array of map[unknown]A list of tool definitions that the model should be allowed to call. For the Chat Completions API, the list of tool definitions might look like: `[ { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } }, { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } } ]`\n\nChatCompletion object { id, choices, created, 7 more } Represents a chat completion response returned by model, based on the provided input.id: stringA unique identifier for the chat completion.choices: array of object { finish_reason, index, logprobs, message } A list of chat completion choices. Can be more than one if `n` is greater than 1.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 moreThe 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.\nRead the [Model Spec](https://model-spec.openai.com/2025-12-18.html) for more.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.message: [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.created: numberThe Unix timestamp (in seconds) of when the chat completion was created.formatunixtimemodel: stringThe model used for the chat completion.object: \"chat.completion\"The object type, which is always `chat.completion`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.moderation: optional object { input, output } or nullModeration results for the request input and generated output, if moderated\ncompletions were requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.\n\nChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.\n\nChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionAudio object { id, data, expires_at, transcript } If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).id: stringUnique identifier for this audio response.data: stringBase64 encoded audio bytes generated by the model, in the format\nspecified in the request.expires_at: numberThe Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.formatunixtimetranscript: stringTranscript of the audio generated by the model.\n\nChatCompletionAudioParam object { format, voice } Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](/api/docs/guides/audio).format: \"wav\" or \"aac\" or \"mp3\" or 3 moreSpecifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.One of the following:\"wav\"\"aac\"\"mp3\"\"flac\"\"opus\"\"pcm16\"voice: string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } 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\" }`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nChatCompletionChunk object { id, choices, created, 7 more } Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input.\n[Learn more](/api/docs/guides/streaming-responses).id: stringA unique identifier for the chat completion. Each chunk has the same ID.choices: array of object { delta, finish_reason, index, logprobs } 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}`.delta: object { content, function_call, refusal, 2 more } A chat completion delta generated by streamed model responses.content: optional string or nullThe contents of the chunk message.Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: optional stringThe 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.name: optional stringThe name of the function to call.refusal: optional string or nullThe refusal message generated by the model.role: optional \"developer\" or \"system\" or \"user\" or 2 moreThe role of the author of this message.One of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"tool_calls: optional array of object { index, id, function, type } index: numberid: optional stringThe ID of the tool call.function: optional object { arguments, name } arguments: optional stringThe 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.name: optional stringThe name of the function to call.type: optional \"function\"The type of the tool. Currently, only `function` is supported.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 more or nullThe 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.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: optional object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.created: numberThe Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.formatunixtimemodel: stringThe model to generate the completion.object: \"chat.completion.chunk\"The object type, which is always `chat.completion.chunk`.moderation: optional object { input, output } or nullModeration results for the request input and generated output. Present\non the moderation chunk when moderated completions are requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.obfuscation: optional stringAn obfuscation string added to normalize the size of streamed chunks as a\nmitigation to certain side-channel attacks. The field is included by\ndefault and omitted when `stream_options.include_obfuscation` is `false`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis 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.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } or nullAn 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. **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\nChatCompletionContentPart = [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or [ChatCompletionContentPartInputAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_input_audio%20%3E%20(schema)) { input_audio, type, prompt_cache_breakpoint } or object { file, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.\n\nChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionDeleted object { id, deleted, object } id: stringThe ID of the chat completion that was deleted.deleted: booleanWhether the chat completion was deleted.object: \"chat.completion.deleted\"The type of object being deleted.\n\nChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionFunctionCallOption object { name } Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.name: stringThe name of the function to call.\n\nChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessage object { content, refusal, role, 4 more } A chat completion message generated by the model.content: string or nullThe contents of the message.refusal: string or nullThe refusal message generated by the model.role: \"assistant\"The role of the author of this message.annotations: optional array of object { type, url_citation } Annotations for the message, when applicable, as when using the\n[web search tool](/api/docs/guides/tools-web-search).type: \"url_citation\"The type of the URL citation. Always `url_citation`.url_citation: object { end_index, start_index, title, url } A URL citation when using web search.end_index: numberThe index of the last character of the URL citation in the message.start_index: numberThe index of the first character of the URL citation in the message.title: stringThe title of the web resource.url: stringThe URL of the web resource.formaturiaudio: optional [ChatCompletionAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_audio%20%3E%20(schema)) { id, data, expires_at, transcript } or nullIf the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessageParam = [ChatCompletionDeveloperMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_developer_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionSystemMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_system_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionUserMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_user_message_param%20%3E%20(schema)) { content, role, name } or 3 moreDeveloper-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.One of the following:ChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.ChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.ChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionMessageToolCall = [ChatCompletionMessageFunctionToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_function_tool_call%20%3E%20(schema)) { id, function, type } or [ChatCompletionMessageCustomToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_custom_tool_call%20%3E%20(schema)) { id, custom, type } A call to a function tool created by the model.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionModality = \"text\" or \"audio\"One of the following:\"text\"\"audio\"\n\nChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.\n\nChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionPredictionContent object { content, type } Static predicted output content, such as the content of a text file that is\nbeing regenerated.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextContent = stringThe content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text inputs.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.type: \"content\"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n\nChatCompletionRole = \"developer\" or \"system\" or \"user\" or 3 moreThe role of the author of a messageOne of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"\"function\"\n\nChatCompletionStoreMessage = [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.id: stringThe identifier of the chat message.content_parts: optional array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or nullIf a content parts array was provided, this is an array of `text` and `image_url` parts.\nOtherwise, null.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionStreamOptions object { include_obfuscation, include_usage } Options for streaming response. Only set this when you set `stream: true`.include_obfuscation: optional booleanWhen 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.include_usage: optional booleanIf 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. All 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\nChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionTokenLogprob object { token, bytes, logprob, top_logprobs } token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.\n\nChatCompletionTool = [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } or [ChatCompletionCustomTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_custom_tool%20%3E%20(schema)) { custom, type } A function tool that can be used to generate a response.One of the following:ChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionToolChoiceOption = \"none\" or \"auto\" or \"required\" or [ChatCompletionAllowedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_allowed_tool_choice%20%3E%20(schema)) { allowed_tools, type } or [ChatCompletionNamedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice%20%3E%20(schema)) { function, type } or [ChatCompletionNamedToolChoiceCustom](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice_custom%20%3E%20(schema)) { custom, type } 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. `none` is the default when no tools are present. `auto` is the default if tools are present.One of the following:ToolChoiceMode = \"none\" or \"auto\" or \"required\"`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.One of the following:\"none\"\"auto\"\"required\"ChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.ChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.\n\nChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.", "znaku_textu": 73734, "slov": 9271, "odkazu": 752, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/chat", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:53:04", "sha256": "495da05a2ea59639b42f90b47583968c2e8392bb8117b856d37a15ddc9ea589f", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://model-spec.openai.com/2025-12-18.html"]} {"url": "https://developers.openai.com/api/docs/api-reference/chat/create", "titulek": "Chat | OpenAI API Reference", "h1": "Chat", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/chat/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Chat", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/chat/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nChatCompletionAllowedTools object { mode, tools } Constrains the tools available to the model to a pre-defined set.mode: \"auto\" or \"required\"Constrains the tools available to the model to a pre-defined set. `auto` allows the model to pick from among the allowed tools and generate a\nmessage. `required` requires the model to call one or more of the allowed tools.One of the following:\"auto\"\"required\"tools: array of map[unknown]A list of tool definitions that the model should be allowed to call. For the Chat Completions API, the list of tool definitions might look like: `[ { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } }, { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } } ]`\n\nChatCompletion object { id, choices, created, 7 more } Represents a chat completion response returned by model, based on the provided input.id: stringA unique identifier for the chat completion.choices: array of object { finish_reason, index, logprobs, message } A list of chat completion choices. Can be more than one if `n` is greater than 1.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 moreThe 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.\nRead the [Model Spec](https://model-spec.openai.com/2025-12-18.html) for more.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.message: [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.created: numberThe Unix timestamp (in seconds) of when the chat completion was created.formatunixtimemodel: stringThe model used for the chat completion.object: \"chat.completion\"The object type, which is always `chat.completion`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.moderation: optional object { input, output } or nullModeration results for the request input and generated output, if moderated\ncompletions were requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.\n\nChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.\n\nChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionAudio object { id, data, expires_at, transcript } If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).id: stringUnique identifier for this audio response.data: stringBase64 encoded audio bytes generated by the model, in the format\nspecified in the request.expires_at: numberThe Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.formatunixtimetranscript: stringTranscript of the audio generated by the model.\n\nChatCompletionAudioParam object { format, voice } Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](/api/docs/guides/audio).format: \"wav\" or \"aac\" or \"mp3\" or 3 moreSpecifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.One of the following:\"wav\"\"aac\"\"mp3\"\"flac\"\"opus\"\"pcm16\"voice: string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } 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\" }`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nChatCompletionChunk object { id, choices, created, 7 more } Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input.\n[Learn more](/api/docs/guides/streaming-responses).id: stringA unique identifier for the chat completion. Each chunk has the same ID.choices: array of object { delta, finish_reason, index, logprobs } 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}`.delta: object { content, function_call, refusal, 2 more } A chat completion delta generated by streamed model responses.content: optional string or nullThe contents of the chunk message.Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: optional stringThe 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.name: optional stringThe name of the function to call.refusal: optional string or nullThe refusal message generated by the model.role: optional \"developer\" or \"system\" or \"user\" or 2 moreThe role of the author of this message.One of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"tool_calls: optional array of object { index, id, function, type } index: numberid: optional stringThe ID of the tool call.function: optional object { arguments, name } arguments: optional stringThe 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.name: optional stringThe name of the function to call.type: optional \"function\"The type of the tool. Currently, only `function` is supported.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 more or nullThe 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.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: optional object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.created: numberThe Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.formatunixtimemodel: stringThe model to generate the completion.object: \"chat.completion.chunk\"The object type, which is always `chat.completion.chunk`.moderation: optional object { input, output } or nullModeration results for the request input and generated output. Present\non the moderation chunk when moderated completions are requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.obfuscation: optional stringAn obfuscation string added to normalize the size of streamed chunks as a\nmitigation to certain side-channel attacks. The field is included by\ndefault and omitted when `stream_options.include_obfuscation` is `false`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis 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.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } or nullAn 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. **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\nChatCompletionContentPart = [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or [ChatCompletionContentPartInputAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_input_audio%20%3E%20(schema)) { input_audio, type, prompt_cache_breakpoint } or object { file, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.\n\nChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionDeleted object { id, deleted, object } id: stringThe ID of the chat completion that was deleted.deleted: booleanWhether the chat completion was deleted.object: \"chat.completion.deleted\"The type of object being deleted.\n\nChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionFunctionCallOption object { name } Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.name: stringThe name of the function to call.\n\nChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessage object { content, refusal, role, 4 more } A chat completion message generated by the model.content: string or nullThe contents of the message.refusal: string or nullThe refusal message generated by the model.role: \"assistant\"The role of the author of this message.annotations: optional array of object { type, url_citation } Annotations for the message, when applicable, as when using the\n[web search tool](/api/docs/guides/tools-web-search).type: \"url_citation\"The type of the URL citation. Always `url_citation`.url_citation: object { end_index, start_index, title, url } A URL citation when using web search.end_index: numberThe index of the last character of the URL citation in the message.start_index: numberThe index of the first character of the URL citation in the message.title: stringThe title of the web resource.url: stringThe URL of the web resource.formaturiaudio: optional [ChatCompletionAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_audio%20%3E%20(schema)) { id, data, expires_at, transcript } or nullIf the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessageParam = [ChatCompletionDeveloperMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_developer_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionSystemMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_system_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionUserMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_user_message_param%20%3E%20(schema)) { content, role, name } or 3 moreDeveloper-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.One of the following:ChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.ChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.ChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionMessageToolCall = [ChatCompletionMessageFunctionToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_function_tool_call%20%3E%20(schema)) { id, function, type } or [ChatCompletionMessageCustomToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_custom_tool_call%20%3E%20(schema)) { id, custom, type } A call to a function tool created by the model.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionModality = \"text\" or \"audio\"One of the following:\"text\"\"audio\"\n\nChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.\n\nChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionPredictionContent object { content, type } Static predicted output content, such as the content of a text file that is\nbeing regenerated.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextContent = stringThe content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text inputs.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.type: \"content\"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n\nChatCompletionRole = \"developer\" or \"system\" or \"user\" or 3 moreThe role of the author of a messageOne of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"\"function\"\n\nChatCompletionStoreMessage = [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.id: stringThe identifier of the chat message.content_parts: optional array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or nullIf a content parts array was provided, this is an array of `text` and `image_url` parts.\nOtherwise, null.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionStreamOptions object { include_obfuscation, include_usage } Options for streaming response. Only set this when you set `stream: true`.include_obfuscation: optional booleanWhen 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.include_usage: optional booleanIf 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. All 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\nChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionTokenLogprob object { token, bytes, logprob, top_logprobs } token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.\n\nChatCompletionTool = [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } or [ChatCompletionCustomTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_custom_tool%20%3E%20(schema)) { custom, type } A function tool that can be used to generate a response.One of the following:ChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionToolChoiceOption = \"none\" or \"auto\" or \"required\" or [ChatCompletionAllowedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_allowed_tool_choice%20%3E%20(schema)) { allowed_tools, type } or [ChatCompletionNamedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice%20%3E%20(schema)) { function, type } or [ChatCompletionNamedToolChoiceCustom](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice_custom%20%3E%20(schema)) { custom, type } 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. `none` is the default when no tools are present. `auto` is the default if tools are present.One of the following:ToolChoiceMode = \"none\" or \"auto\" or \"required\"`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.One of the following:\"none\"\"auto\"\"required\"ChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.ChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.\n\nChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.", "znaku_textu": 73734, "slov": 9271, "odkazu": 752, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/chat", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:02:42", "sha256": "495da05a2ea59639b42f90b47583968c2e8392bb8117b856d37a15ddc9ea589f", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://model-spec.openai.com/2025-12-18.html"]} {"url": "https://developers.openai.com/api/docs/api-reference/chat/object", "titulek": "Chat | OpenAI API Reference", "h1": "Chat", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/chat/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Chat", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/chat/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nChatCompletionAllowedTools object { mode, tools } Constrains the tools available to the model to a pre-defined set.mode: \"auto\" or \"required\"Constrains the tools available to the model to a pre-defined set. `auto` allows the model to pick from among the allowed tools and generate a\nmessage. `required` requires the model to call one or more of the allowed tools.One of the following:\"auto\"\"required\"tools: array of map[unknown]A list of tool definitions that the model should be allowed to call. For the Chat Completions API, the list of tool definitions might look like: `[ { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } }, { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } } ]`\n\nChatCompletion object { id, choices, created, 7 more } Represents a chat completion response returned by model, based on the provided input.id: stringA unique identifier for the chat completion.choices: array of object { finish_reason, index, logprobs, message } A list of chat completion choices. Can be more than one if `n` is greater than 1.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 moreThe 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.\nRead the [Model Spec](https://model-spec.openai.com/2025-12-18.html) for more.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.message: [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.created: numberThe Unix timestamp (in seconds) of when the chat completion was created.formatunixtimemodel: stringThe model used for the chat completion.object: \"chat.completion\"The object type, which is always `chat.completion`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.moderation: optional object { input, output } or nullModeration results for the request input and generated output, if moderated\ncompletions were requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.\n\nChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.\n\nChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionAudio object { id, data, expires_at, transcript } If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).id: stringUnique identifier for this audio response.data: stringBase64 encoded audio bytes generated by the model, in the format\nspecified in the request.expires_at: numberThe Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.formatunixtimetranscript: stringTranscript of the audio generated by the model.\n\nChatCompletionAudioParam object { format, voice } Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](/api/docs/guides/audio).format: \"wav\" or \"aac\" or \"mp3\" or 3 moreSpecifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.One of the following:\"wav\"\"aac\"\"mp3\"\"flac\"\"opus\"\"pcm16\"voice: string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } 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\" }`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nChatCompletionChunk object { id, choices, created, 7 more } Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input.\n[Learn more](/api/docs/guides/streaming-responses).id: stringA unique identifier for the chat completion. Each chunk has the same ID.choices: array of object { delta, finish_reason, index, logprobs } 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}`.delta: object { content, function_call, refusal, 2 more } A chat completion delta generated by streamed model responses.content: optional string or nullThe contents of the chunk message.Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: optional stringThe 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.name: optional stringThe name of the function to call.refusal: optional string or nullThe refusal message generated by the model.role: optional \"developer\" or \"system\" or \"user\" or 2 moreThe role of the author of this message.One of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"tool_calls: optional array of object { index, id, function, type } index: numberid: optional stringThe ID of the tool call.function: optional object { arguments, name } arguments: optional stringThe 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.name: optional stringThe name of the function to call.type: optional \"function\"The type of the tool. Currently, only `function` is supported.finish_reason: \"stop\" or \"length\" or \"tool_calls\" or 2 more or nullThe 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.One of the following:\"stop\"\"length\"\"tool_calls\"\"content_filter\"\"function_call\"index: numberThe index of the choice in the list of choices.logprobs: optional object { content, refusal } or nullLog probability information for the choice.content: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message content tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.refusal: array of [ChatCompletionTokenLogprob](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_token_logprob%20%3E%20(schema)) { token, bytes, logprob, top_logprobs } or nullA list of message refusal tokens with log probability information.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.created: numberThe Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.formatunixtimemodel: stringThe model to generate the completion.object: \"chat.completion.chunk\"The object type, which is always `chat.completion.chunk`.moderation: optional object { input, output } or nullModeration results for the request input and generated output. Present\non the moderation chunk when moderated completions are requested.input: object { model, results, type } or object { code, message, type } Moderation for the request input.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.output: object { model, results, type } or object { code, message, type } Moderation for the generated output.One of the following:ModerationResults object { model, results, type } Successful moderation results for the request input or generated output.model: stringThe moderation model used to generate the results.results: array of object { categories, category_applied_input_types, category_scores, 3 more } A list of moderation results.categories: map[boolean]A dictionary of moderation categories to booleans, True if the input is flagged under this category.category_applied_input_types: map[array of \"text\" or \"image\"]Which modalities of input are reflected by the score for each category.One of the following:\"text\"\"image\"category_scores: map[number]A dictionary of moderation categories to scores.flagged: booleanA boolean indicating whether the content was flagged by any category.model: stringThe moderation model that produced this result.type: \"moderation_result\"The object type, which was always `moderation_result` for successful moderation results.type: \"moderation_results\"The object type, which is always `moderation_results`.Error object { code, message, type } An error produced while attempting moderation.code: stringThe error code.message: stringThe error message.type: \"error\"The object type, which is always `error`.obfuscation: optional stringAn obfuscation string added to normalize the size of streamed chunks as a\nmitigation to certain side-channel attacks. The field is included by\ndefault and omitted when `stream_options.include_obfuscation` is `false`.service_tier: optional \"auto\" or \"default\" or \"flex\" or 3 more or nullSpecifies the processing type used for serving the request. 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’. If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model. If set to ‘[flex](/api/docs/guides/flex-processing)’, then the request will be processed with the Flex Processing service tier. To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. When not set, the default behavior is ‘auto’. 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.One of the following:\"auto\"\"default\"\"flex\"\"scale\"\"priority\"\"fast\"Deprecatedsystem_fingerprint: optional stringThis 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.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } or nullAn 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. **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\nChatCompletionContentPart = [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or [ChatCompletionContentPartInputAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_input_audio%20%3E%20(schema)) { input_audio, type, prompt_cache_breakpoint } or object { file, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.\n\nChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionDeleted object { id, deleted, object } id: stringThe ID of the chat completion that was deleted.deleted: booleanWhether the chat completion was deleted.object: \"chat.completion.deleted\"The type of object being deleted.\n\nChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionFunctionCallOption object { name } Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.name: stringThe name of the function to call.\n\nChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessage object { content, refusal, role, 4 more } A chat completion message generated by the model.content: string or nullThe contents of the message.refusal: string or nullThe refusal message generated by the model.role: \"assistant\"The role of the author of this message.annotations: optional array of object { type, url_citation } Annotations for the message, when applicable, as when using the\n[web search tool](/api/docs/guides/tools-web-search).type: \"url_citation\"The type of the URL citation. Always `url_citation`.url_citation: object { end_index, start_index, title, url } A URL citation when using web search.end_index: numberThe index of the last character of the URL citation in the message.start_index: numberThe index of the first character of the URL citation in the message.title: stringThe title of the web resource.url: stringThe URL of the web resource.formaturiaudio: optional [ChatCompletionAudio](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_audio%20%3E%20(schema)) { id, data, expires_at, transcript } or nullIf the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/api/docs/guides/audio).Deprecatedfunction_call: optional object { arguments, name } Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.\n\nChatCompletionMessageParam = [ChatCompletionDeveloperMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_developer_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionSystemMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_system_message_param%20%3E%20(schema)) { content, role, name } or [ChatCompletionUserMessageParam](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_user_message_param%20%3E%20(schema)) { content, role, name } or 3 moreDeveloper-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.One of the following:ChatCompletionDeveloperMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the developer message.One of the following:TextContent = stringThe contents of the developer message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For developer messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"developer\"The role of the messages author, in this case `developer`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.ChatCompletionAssistantMessageParam object { role, audio, content, 4 more } Messages sent by the model in response to user messages.role: \"assistant\"The role of the messages author, in this case `assistant`.audio: optional object { id } or nullData about a previous audio response from the model.\n[Learn more](/api/docs/guides/audio).id: stringUnique identifier for a previous audio response from the model.content: optional string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } or nullThe contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.One of the following:TextContent = stringThe contents of the assistant message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartRefusal](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_refusal%20%3E%20(schema)) { refusal, type } An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartRefusal object { refusal, type } refusal: stringThe refusal message generated by the model.type: \"refusal\"The type of the content part.Deprecatedfunction_call: optional object { arguments, name } or nullDeprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.arguments: stringThe 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.name: stringThe name of the function to call.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.refusal: optional string or nullThe refusal message by the assistant.tool_calls: optional array of [ChatCompletionMessageToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_tool_call%20%3E%20(schema))The tool calls generated by the model, such as function calls.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.ChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.ChatCompletionFunctionMessageParam object { content, name, role } content: string or nullThe contents of the function message.name: stringThe name of the function to call.role: \"function\"The role of the messages author, in this case `function`.\n\nChatCompletionMessageToolCall = [ChatCompletionMessageFunctionToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_function_tool_call%20%3E%20(schema)) { id, function, type } or [ChatCompletionMessageCustomToolCall](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message_custom_tool_call%20%3E%20(schema)) { id, custom, type } A call to a function tool created by the model.One of the following:ChatCompletionMessageFunctionToolCall object { id, function, type } A call to a function tool created by the model.id: stringThe ID of the tool call.function: object { arguments, name } The function that the model called.arguments: stringThe 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.name: stringThe name of the function to call.type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionMessageCustomToolCall object { id, custom, type } A call to a custom tool created by the model.id: stringThe ID of the tool call.custom: object { input, name } The custom tool that the model called.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool to call.type: \"custom\"The type of the tool. Always `custom`.\n\nChatCompletionModality = \"text\" or \"audio\"One of the following:\"text\"\"audio\"\n\nChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.\n\nChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionPredictionContent object { content, type } Static predicted output content, such as the content of a text file that is\nbeing regenerated.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextContent = stringThe content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text inputs.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.type: \"content\"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n\nChatCompletionRole = \"developer\" or \"system\" or \"user\" or 3 moreThe role of the author of a messageOne of the following:\"developer\"\"system\"\"user\"\"assistant\"\"tool\"\"function\"\n\nChatCompletionStoreMessage = [ChatCompletionMessage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_message%20%3E%20(schema)) { content, refusal, role, 4 more } A chat completion message generated by the model.id: stringThe identifier of the chat message.content_parts: optional array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ChatCompletionContentPartImage](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_image%20%3E%20(schema)) { image_url, type, prompt_cache_breakpoint } or nullIf a content parts array was provided, this is an array of `text` and `image_url` parts.\nOtherwise, null.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.\n\nChatCompletionStreamOptions object { include_obfuscation, include_usage } Options for streaming response. Only set this when you set `stream: true`.include_obfuscation: optional booleanWhen 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.include_usage: optional booleanIf 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. All 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\nChatCompletionSystemMessageParam object { content, role, name } 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.content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the system message.One of the following:TextContent = stringThe contents of the system message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For system messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"system\"The role of the messages author, in this case `system`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.\n\nChatCompletionTokenLogprob object { token, bytes, logprob, top_logprobs } token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.top_logprobs: array of object { token, bytes, logprob } List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.token: stringThe token.bytes: array of number or nullA 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.logprob: numberThe 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.\n\nChatCompletionTool = [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } or [ChatCompletionCustomTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_custom_tool%20%3E%20(schema)) { custom, type } A function tool that can be used to generate a response.One of the following:ChatCompletionFunctionTool object { function, type } A function tool that can be used to generate a response.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.ChatCompletionCustomTool object { custom, type } A custom tool that processes input using a specified format.custom: object { name, description, format } Properties of the custom tool.name: stringThe name of the custom tool, used to identify it in tool calls.description: optional stringOptional description of the custom tool, used to provide more context.format: optional object { type } or object { grammar, type } The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { grammar, type } A grammar defined by the user.grammar: object { definition, syntax } Your chosen grammar.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.type: \"custom\"The type of the custom tool. Always `custom`.\n\nChatCompletionToolChoiceOption = \"none\" or \"auto\" or \"required\" or [ChatCompletionAllowedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_allowed_tool_choice%20%3E%20(schema)) { allowed_tools, type } or [ChatCompletionNamedToolChoice](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice%20%3E%20(schema)) { function, type } or [ChatCompletionNamedToolChoiceCustom](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_named_tool_choice_custom%20%3E%20(schema)) { custom, type } 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. `none` is the default when no tools are present. `auto` is the default if tools are present.One of the following:ToolChoiceMode = \"none\" or \"auto\" or \"required\"`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.One of the following:\"none\"\"auto\"\"required\"ChatCompletionAllowedToolChoice object { allowed_tools, type } Constrains the tools available to the model to a pre-defined set.allowed_tools: [ChatCompletionAllowedTools](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20ChatCompletionAllowedTools%20%3E%20(schema)) { mode, tools } Constrains the tools available to the model to a pre-defined set.type: \"allowed_tools\"Allowed tool configuration type. Always `allowed_tools`.ChatCompletionNamedToolChoice object { function, type } Specifies a tool the model should use. Use to force the model to call a specific function.function: object { name } name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ChatCompletionNamedToolChoiceCustom object { custom, type } Specifies a tool the model should use. Use to force the model to call a specific custom tool.custom: object { name } name: stringThe name of the custom tool to call.type: \"custom\"For custom tool calling, the type is always `custom`.\n\nChatCompletionToolMessageParam object { content, role, tool_call_id } content: string or array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } The contents of the tool message.One of the following:TextContent = stringThe contents of the tool message.ArrayOfContentParts = array of [ChatCompletionContentPartText](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } An array of content parts with a defined type. For tool messages, only type `text` is supported.text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"tool\"The role of the messages author, in this case `tool`.tool_call_id: stringTool call that this message is responding to.\n\nChatCompletionUserMessageParam object { content, role, name } Messages sent by an end user, containing prompts or additional context\ninformation.content: string or array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))The contents of the user message.One of the following:TextContent = stringThe text contents of the message.ArrayOfContentParts = array of [ChatCompletionContentPart](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_content_part%20%3E%20(schema))An array of content parts with a defined type. Supported options differ based on the [model](/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs.One of the following:ChatCompletionContentPartText object { text, type, prompt_cache_breakpoint } Learn about [text inputs](/api/docs/guides/text).text: stringThe text content.type: \"text\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartImage object { image_url, type, prompt_cache_breakpoint } Learn about [image inputs](/api/docs/guides/images-vision).image_url: object { url, detail } url: stringEither a URL of the image or the base64 encoded image data.formaturidetail: optional \"auto\" or \"low\" or \"high\"Specifies the detail level of the image. Learn more in the [Vision guide](/api/docs/guides/images-vision#choose-an-image-detail-level).One of the following:\"auto\"\"low\"\"high\"type: \"image_url\"The type of the content part.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ChatCompletionContentPartInputAudio object { input_audio, type, prompt_cache_breakpoint } Learn about [audio inputs](/api/docs/guides/audio).input_audio: object { data, format } data: stringBase64 encoded audio data.format: \"wav\" or \"mp3\"The format of the encoded audio data. Currently supports “wav” and “mp3”.One of the following:\"wav\"\"mp3\"type: \"input_audio\"The type of the content part. Always `input_audio`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.FileContentPart object { file, type, prompt_cache_breakpoint } Learn about [file inputs](/api/docs/guides/text) for text generation.file: object { file_data, file_id, filename } file_data: optional stringThe base64 encoded file data, used when passing the file to the model\nas a string.file_id: optional stringThe ID of an uploaded file to use as input.filename: optional stringThe name of the file, used when passing the file to the model as a\nstring.type: \"file\"The type of the content part. Always `file`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\"The role of the messages author, in this case `user`.name: optional stringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.", "znaku_textu": 73734, "slov": 9271, "odkazu": 752, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/chat", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:47", "sha256": "495da05a2ea59639b42f90b47583968c2e8392bb8117b856d37a15ddc9ea589f", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://model-spec.openai.com/2025-12-18.html"]} {"url": "https://developers.openai.com/api/docs/api-reference/completions", "titulek": "Completions | OpenAI API Reference", "h1": "Completions", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/completions/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Completions", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/completions/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nCompletion object { id, choices, created, 4 more } Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).id: stringA unique identifier for the completion.choices: array of [CompletionChoice](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_choice%20%3E%20(schema)) { finish_reason, index, logprobs, text } The list of completion choices the model generated for the input prompt.finish_reason: \"stop\" or \"length\" or \"content_filter\"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,\nor `content_filter` if content was omitted due to a flag from our content filters.One of the following:\"stop\"\"length\"\"content_filter\"index: numberlogprobs: object { text_offset, token_logprobs, tokens, top_logprobs } or nulltext_offset: optional array of numbertoken_logprobs: optional array of numbertokens: optional array of stringtop_logprobs: optional array of map[number]text: stringcreated: numberThe Unix timestamp (in seconds) of when the completion was created.formatunixtimemodel: stringThe model used for completion.object: \"text_completion\"The object type, which is always “text_completion”system_fingerprint: optional stringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.\n\nCompletionChoice object { finish_reason, index, logprobs, text } finish_reason: \"stop\" or \"length\" or \"content_filter\"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,\nor `content_filter` if content was omitted due to a flag from our content filters.One of the following:\"stop\"\"length\"\"content_filter\"index: numberlogprobs: object { text_offset, token_logprobs, tokens, top_logprobs } or nulltext_offset: optional array of numbertoken_logprobs: optional array of numbertokens: optional array of stringtop_logprobs: optional array of map[number]text: string\n\nCompletionUsage object { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.completion_tokens: numberNumber of tokens in the generated completion.prompt_tokens: numberNumber of tokens in the prompt.total_tokens: numberTotal number of tokens used in the request (prompt + completion).completion_tokens_details: optional object { accepted_prediction_tokens, audio_tokens, reasoning_tokens, 2 more } Breakdown of tokens used in a completion.accepted_prediction_tokens: optional numberWhen using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.audio_tokens: optional numberAudio input tokens generated by the model.reasoning_tokens: optional numberTokens generated by the model for reasoning.rejected_prediction_tokens: optional numberWhen 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 billing, output, and context window\nlimits.text_tokens: optional numberText output tokens generated by the model.prompt_tokens_details: optional object { audio_tokens, cache_write_tokens, cached_tokens, 2 more } Breakdown of tokens used in the prompt.audio_tokens: optional numberAudio input tokens present in the prompt.cache_write_tokens: optional numberThe unadjusted number of prompt tokens written to cache.cached_tokens: optional numberCached tokens present in the prompt.image_tokens: optional numberImage input tokens present in the prompt.text_tokens: optional numberText input tokens present in the prompt.", "znaku_textu": 4285, "slov": 510, "odkazu": 407, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:50", "sha256": "827c1ac6b52fe52ecb1cc924f207859a80da6631762c33f4ec62b9b0b28002f2", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/completions/create", "titulek": "Create completion | OpenAI API Reference", "h1": "Create completion", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/completions/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create completion", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/completions/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Completions"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create completion"}, {"uroven": 3, "text": "Create completion"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Creates a completion for the provided prompt and parameters.\n\nReturns a completion object, or a sequence of completion objects if the request is streamed.\n\n##### Body ParametersJSONExpand Collapse\n\nmodel: string or \"gpt-3.5-turbo-instruct\" or \"davinci-002\" or \"babbage-002\"ID of the model to use. You can use the [List models](/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](/api/docs/models) for descriptions of them.One of the following:string\"gpt-3.5-turbo-instruct\" or \"davinci-002\" or \"babbage-002\"ID of the model to use. You can use the [List models](/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](/api/docs/models) for descriptions of them.One of the following:\"gpt-3.5-turbo-instruct\"\"davinci-002\"\"babbage-002\"\n\nprompt: string or array of string or array of number or array of array of number or nullThe prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.One of the following:stringarray of stringarray of numberarray of array of number\n\nbest_of : optional number or null\n\nGenerates `best_of` completions server-side and returns the “best” (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n\nminimum 0\n\nmaximum 20\n\necho : optional boolean or null\n\nEcho back the prompt in addition to the completion\n\nfrequency_penalty : optional number or null\n\nNumber between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/api/docs/guides/text)\n\nminimum -2\n\nmaximum 2\n\nlogit_bias : optional map[number] or null\n\nModify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.\n\nlogprobs : optional number or null\n\nInclude the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.\n\nminimum 0\n\nmaximum 5\n\nmax_tokens : optional number or null\n\nThe maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model’s context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n\nminimum 0\n\nn : optional number or null\n\nHow many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n\nminimum 1\n\nmaximum 128\n\npresence_penalty : optional number or null\n\nNumber between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/api/docs/guides/text)\n\nminimum -2\n\nmaximum 2\n\nseed : optional number or null\n\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.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n\nformat int64\n\nstop: optional string or array of string or nullNot supported with latest reasoning models `o3` and `o4-mini`. Up to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.One of the following:stringarray of string\n\nstream : optional boolean or null\n\nWhether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n\nstream_options: optional [ChatCompletionStreamOptions](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_stream_options%20%3E%20(schema)) { include_obfuscation, include_usage } or nullOptions for streaming response. Only set this when you set `stream: true`.include_obfuscation: optional booleanWhen 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.include_usage: optional booleanIf 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. All 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\nsuffix : optional string or null\n\nThe suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.\n\ntemperature : optional number or null\n\nWhat 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.\n\nWe generally recommend altering this or `top_p` but not both.\n\nminimum 0\n\nmaximum 2\n\ntop_p : optional number or null\n\nAn alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.\n\nminimum 0\n\nmaximum 1\n\nuser : optional string\n\nA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n\n##### ReturnsExpand Collapse\n\nCompletion object { id, choices, created, 4 more } Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).id: stringA unique identifier for the completion.choices: array of [CompletionChoice](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_choice%20%3E%20(schema)) { finish_reason, index, logprobs, text } The list of completion choices the model generated for the input prompt.finish_reason: \"stop\" or \"length\" or \"content_filter\"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,\nor `content_filter` if content was omitted due to a flag from our content filters.One of the following:\"stop\"\"length\"\"content_filter\"index: numberlogprobs: object { text_offset, token_logprobs, tokens, top_logprobs } or nulltext_offset: optional array of numbertoken_logprobs: optional array of numbertokens: optional array of stringtop_logprobs: optional array of map[number]text: stringcreated: numberThe Unix timestamp (in seconds) of when the completion was created.formatunixtimemodel: stringThe model used for completion.object: \"text_completion\"The object type, which is always “text_completion”system_fingerprint: optional stringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.completion_tokens: numberNumber of tokens in the generated completion.prompt_tokens: numberNumber of tokens in the prompt.total_tokens: numberTotal number of tokens used in the request (prompt + completion).completion_tokens_details: optional object { accepted_prediction_tokens, audio_tokens, reasoning_tokens, 2 more } Breakdown of tokens used in a completion.accepted_prediction_tokens: optional numberWhen using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.audio_tokens: optional numberAudio input tokens generated by the model.reasoning_tokens: optional numberTokens generated by the model for reasoning.rejected_prediction_tokens: optional numberWhen 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 billing, output, and context window\nlimits.text_tokens: optional numberText output tokens generated by the model.prompt_tokens_details: optional object { audio_tokens, cache_write_tokens, cached_tokens, 2 more } Breakdown of tokens used in the prompt.audio_tokens: optional numberAudio input tokens present in the prompt.cache_write_tokens: optional numberThe unadjusted number of prompt tokens written to cache.cached_tokens: optional numberCached tokens present in the prompt.image_tokens: optional numberImage input tokens present in the prompt.text_tokens: optional numberText input tokens present in the prompt.\n\nNo streaming Streaming\n\n### Create completion\n\n```\ncurl https://api.openai.com/v1/completions \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -d '{ \"model\": \"gpt-3.5-turbo-instruct\", \"prompt\": \"Say this is a test\", \"max_tokens\": 7, \"temperature\": 0 }' \n```\n\n```\n{ \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\", \"object\": \"text_completion\", \"created\": 1589478378, \"model\": \"gpt-3.5-turbo-instruct\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\": [ { \"text\": \"\\n\\nThis is indeed a test\", \"index\": 0, \"logprobs\": null, \"finish_reason\": \"length\" } ], \"usage\": { \"prompt_tokens\": 5, \"completion_tokens\": 7, \"total_tokens\": 12 } } \n```\n\n### Create completion\n\n```\ncurl https://api.openai.com/v1/completions \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -d '{ \"model\": \"gpt-3.5-turbo-instruct\", \"prompt\": \"Say this is a test\", \"max_tokens\": 7, \"temperature\": 0, \"stream\": true }' \n```\n\n```\n{ \"id\": \"cmpl-7iA7iJjj8V2zOkCGvWF2hAkDWBQZe\", \"object\": \"text_completion\", \"created\": 1690759702, \"choices\": [ { \"text\": \"This\", \"index\": 0, \"logprobs\": null, \"finish_reason\": null } ], \"model\": \"gpt-3.5-turbo-instruct\" \"system_fingerprint\": \"fp_44709d6fcb\", } \n```\n\n##### Returns Examples\n\n```\n{ \"id\": \"id\", \"choices\": [ { \"finish_reason\": \"stop\", \"index\": 0, \"logprobs\": { \"text_offset\": [ 0 ], \"token_logprobs\": [ 0 ], \"tokens\": [ \"string\" ], \"top_logprobs\": [ { \"foo\": 0 } ] }, \"text\": \"text\" } ], \"created\": 0, \"model\": \"model\", \"object\": \"text_completion\", \"system_fingerprint\": \"system_fingerprint\", \"usage\": { \"completion_tokens\": 0, \"prompt_tokens\": 0, \"total_tokens\": 0, \"completion_tokens_details\": { \"accepted_prediction_tokens\": 0, \"audio_tokens\": 0, \"reasoning_tokens\": 0, \"rejected_prediction_tokens\": 0, \"text_tokens\": 0 }, \"prompt_tokens_details\": { \"audio_tokens\": 0, \"cache_write_tokens\": 0, \"cached_tokens\": 0, \"image_tokens\": 0, \"text_tokens\": 0 } } }\n```", "znaku_textu": 13030, "slov": 1778, "odkazu": 445, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:54:09", "sha256": "2352413a6fd2b052f1cea528df8c8f0c1b3590657413819845dd179d36d5c7a4", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://platform.openai.com/tokenizer?view=bpe", "https://platform.openai.com/tokenizer", "https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken", "https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events", "https://cookbook.openai.com/examples/how_to_stream_completions"]} {"url": "https://developers.openai.com/api/docs/api-reference/completions/object", "titulek": "Completions | OpenAI API Reference", "h1": "Completions", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/completions/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Completions", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/completions/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nCompletion object { id, choices, created, 4 more } Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).id: stringA unique identifier for the completion.choices: array of [CompletionChoice](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_choice%20%3E%20(schema)) { finish_reason, index, logprobs, text } The list of completion choices the model generated for the input prompt.finish_reason: \"stop\" or \"length\" or \"content_filter\"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,\nor `content_filter` if content was omitted due to a flag from our content filters.One of the following:\"stop\"\"length\"\"content_filter\"index: numberlogprobs: object { text_offset, token_logprobs, tokens, top_logprobs } or nulltext_offset: optional array of numbertoken_logprobs: optional array of numbertokens: optional array of stringtop_logprobs: optional array of map[number]text: stringcreated: numberThe Unix timestamp (in seconds) of when the completion was created.formatunixtimemodel: stringThe model used for completion.object: \"text_completion\"The object type, which is always “text_completion”system_fingerprint: optional stringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.usage: optional [CompletionUsage](/api/reference/resources/completions#(resource)%20completions%20%3E%20(model)%20completion_usage%20%3E%20(schema)) { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.\n\nCompletionChoice object { finish_reason, index, logprobs, text } finish_reason: \"stop\" or \"length\" or \"content_filter\"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,\nor `content_filter` if content was omitted due to a flag from our content filters.One of the following:\"stop\"\"length\"\"content_filter\"index: numberlogprobs: object { text_offset, token_logprobs, tokens, top_logprobs } or nulltext_offset: optional array of numbertoken_logprobs: optional array of numbertokens: optional array of stringtop_logprobs: optional array of map[number]text: string\n\nCompletionUsage object { completion_tokens, prompt_tokens, total_tokens, 2 more } Usage statistics for the completion request.completion_tokens: numberNumber of tokens in the generated completion.prompt_tokens: numberNumber of tokens in the prompt.total_tokens: numberTotal number of tokens used in the request (prompt + completion).completion_tokens_details: optional object { accepted_prediction_tokens, audio_tokens, reasoning_tokens, 2 more } Breakdown of tokens used in a completion.accepted_prediction_tokens: optional numberWhen using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.audio_tokens: optional numberAudio input tokens generated by the model.reasoning_tokens: optional numberTokens generated by the model for reasoning.rejected_prediction_tokens: optional numberWhen 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 billing, output, and context window\nlimits.text_tokens: optional numberText output tokens generated by the model.prompt_tokens_details: optional object { audio_tokens, cache_write_tokens, cached_tokens, 2 more } Breakdown of tokens used in the prompt.audio_tokens: optional numberAudio input tokens present in the prompt.cache_write_tokens: optional numberThe unadjusted number of prompt tokens written to cache.cached_tokens: optional numberCached tokens present in the prompt.image_tokens: optional numberImage input tokens present in the prompt.text_tokens: optional numberText input tokens present in the prompt.", "znaku_textu": 4285, "slov": 510, "odkazu": 407, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/completions", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:45", "sha256": "827c1ac6b52fe52ecb1cc924f207859a80da6631762c33f4ec62b9b0b28002f2", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/container-files/createContainerFile", "titulek": "Create container file | OpenAI API Reference", "h1": "Create container file", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/containers/subresources/files/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create container file", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/containers/subresources/files/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Containers", "Files"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create container file"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Create a Container File\n\nYou can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.\n\n##### Path ParametersExpand Collapse\n\ncontainer_id : string\n\n##### Body ParametersJSONExpand Collapse\n\nfile : optional file\n\nThe File object (not file name) to be uploaded.\n\nfile_id : optional string\n\nName of the file to create.\n\n##### ReturnsExpand Collapse\n\nid : string\n\nUnique identifier for the file.\n\nbytes : number\n\nSize of the file in bytes.\n\ncontainer_id : string\n\nThe container this file belongs to.\n\ncreated_at : number\n\nUnix timestamp (in seconds) when the file was created.\n\nformat unixtime\n\nobject : string\n\nThe type of this object (`container.file`).\n\npath : string\n\nPath of the file in the container.\n\nsource : string\n\nSource of the file (e.g., `user`, `assistant`).\n\n### Create container file\n\n```\ncurl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -F file=\"@example.txt\" \n```\n\n```\n{ \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\", \"object\": \"container.file\", \"created_at\": 1747848842, \"bytes\": 880, \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\", \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\", \"source\": \"user\" } \n```\n\n##### Returns Examples\n\n```\n{ \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\", \"object\": \"container.file\", \"created_at\": 1747848842, \"bytes\": 880, \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\", \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\", \"source\": \"user\" } \n```", "znaku_textu": 1556, "slov": 181, "odkazu": 381, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:21", "sha256": "742ca476f1fd6fde0a232785e7cb97ecdf7efb3164d66974de2f88cb8510fe6f", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/container-files/listContainerFiles", "titulek": "List container files | OpenAI API Reference", "h1": "List container files", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/containers/subresources/files/methods/list/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "List container files", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/containers/subresources/files/methods/list/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Containers", "Files"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 5, "text": "Query ParametersExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "List container files"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "List Container files\n\n##### Path ParametersExpand Collapse\n\ncontainer_id : string\n\n##### Query ParametersExpand Collapse\n\nafter : optional string\n\nA cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n\nlimit : optional number\n\nA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n\norder: optional \"asc\" or \"desc\"Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.One of the following:\"asc\"\"desc\"\n\n##### ReturnsExpand Collapse\n\ndata: array of object { id, bytes, container_id, 4 more } A list of container files.id: stringUnique identifier for the file.bytes: numberSize of the file in bytes.container_id: stringThe container this file belongs to.created_at: numberUnix timestamp (in seconds) when the file was created.formatunixtimeobject: stringThe type of this object (`container.file`).path: stringPath of the file in the container.source: stringSource of the file (e.g., `user`, `assistant`).\n\nfirst_id : string\n\nThe ID of the first file in the list.\n\nhas_more : boolean\n\nWhether there are more files available.\n\nlast_id : string\n\nThe ID of the last file in the list.\n\nobject : \"list\"\n\nThe type of object returned, must be ‘list’.\n\n### List container files\n\n```\ncurl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \n```\n\n```\n{ \"object\": \"list\", \"data\": [ { \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\", \"object\": \"container.file\", \"created_at\": 1747848842, \"bytes\": 880, \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\", \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\", \"source\": \"user\" } ], \"first_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\", \"has_more\": false, \"last_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\" } \n```\n\n##### Returns Examples\n\n```\n{ \"object\": \"list\", \"data\": [ { \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\", \"object\": \"container.file\", \"created_at\": 1747848842, \"bytes\": 880, \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\", \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\", \"source\": \"user\" } ], \"first_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\", \"has_more\": false, \"last_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\" } \n```", "znaku_textu": 2501, "slov": 300, "odkazu": 389, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:22", "sha256": "a2645934fecd01d9443505c59ff5edbf38b43ecb3134ccd8ba7a54a4b9efceec", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/container-files/retrieveContainerFileContent", "titulek": "Retrieve container file content | OpenAI API Reference", "h1": "Retrieve container file content", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/containers/subresources/files/subresources/content/methods/retrieve/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Retrieve container file content", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/containers/subresources/files/subresources/content/methods/retrieve/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Containers", "Files", "Content"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 3, "text": "Retrieve container file content"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Retrieve Container File Content\n\n##### Path ParametersExpand Collapse\n\ncontainer_id : string\n\nfile_id : string\n\n### Retrieve container file content\n\n```\ncurl https://api.openai.com/v1/containers/container_123/files/cfile_456/content \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \n```\n\n```\n \n```\n\n##### Returns Examples\n\n```\n \n```", "znaku_textu": 345, "slov": 36, "odkazu": 374, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:20", "sha256": "1deef1c7edebeb40336072e246536d23bd12cf55e7e335a0c48228e22263da83", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/containers", "titulek": "Containers | OpenAI API Reference", "h1": "Containers", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/containers/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Containers", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/containers/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["path", "string"], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nContainerCreateResponse object { id, created_at, name, 6 more } id: stringUnique identifier for the container.created_at: numberUnix timestamp (in seconds) when the container was created.formatunixtimename: stringName of the container.object: stringThe type of this object.status: stringStatus of the container (e.g., active, deleted).expires_after: optional object { anchor, minutes } The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.anchor: optional \"last_active_at\"The reference point for the expiration.minutes: optional numberThe number of minutes after the anchor before the container expires.last_active_at: optional numberUnix timestamp (in seconds) when the container was last active.formatunixtimememory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"The memory limit configured for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional object { type, allowed_domains } Network access policy for the container.type: \"allowlist\" or \"disabled\"The network policy mode.One of the following:\"allowlist\"\"disabled\"allowed_domains: optional array of stringAllowed outbound domains when `type` is `allowlist`.\n\nContainerListResponse object { id, created_at, name, 6 more } id: stringUnique identifier for the container.created_at: numberUnix timestamp (in seconds) when the container was created.formatunixtimename: stringName of the container.object: stringThe type of this object.status: stringStatus of the container (e.g., active, deleted).expires_after: optional object { anchor, minutes } The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.anchor: optional \"last_active_at\"The reference point for the expiration.minutes: optional numberThe number of minutes after the anchor before the container expires.last_active_at: optional numberUnix timestamp (in seconds) when the container was last active.formatunixtimememory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"The memory limit configured for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional object { type, allowed_domains } Network access policy for the container.type: \"allowlist\" or \"disabled\"The network policy mode.One of the following:\"allowlist\"\"disabled\"allowed_domains: optional array of stringAllowed outbound domains when `type` is `allowlist`.\n\nContainerRetrieveResponse object { id, created_at, name, 6 more } id: stringUnique identifier for the container.created_at: numberUnix timestamp (in seconds) when the container was created.formatunixtimename: stringName of the container.object: stringThe type of this object.status: stringStatus of the container (e.g., active, deleted).expires_after: optional object { anchor, minutes } The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.anchor: optional \"last_active_at\"The reference point for the expiration.minutes: optional numberThe number of minutes after the anchor before the container expires.last_active_at: optional numberUnix timestamp (in seconds) when the container was last active.formatunixtimememory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"The memory limit configured for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional object { type, allowed_domains } Network access policy for the container.type: \"allowlist\" or \"disabled\"The network policy mode.One of the following:\"allowlist\"\"disabled\"allowed_domains: optional array of stringAllowed outbound domains when `type` is `allowlist`.\n\n##### ModelsExpand Collapse\n\nFileCreateResponse object { id, bytes, container_id, 4 more } id: stringUnique identifier for the file.bytes: numberSize of the file in bytes.container_id: stringThe container this file belongs to.created_at: numberUnix timestamp (in seconds) when the file was created.formatunixtimeobject: stringThe type of this object (`container.file`).path: stringPath of the file in the container.source: stringSource of the file (e.g., `user`, `assistant`).\n\nFileListResponse object { id, bytes, container_id, 4 more } id: stringUnique identifier for the file.bytes: numberSize of the file in bytes.container_id: stringThe container this file belongs to.created_at: numberUnix timestamp (in seconds) when the file was created.formatunixtimeobject: stringThe type of this object (`container.file`).path: stringPath of the file in the container.source: stringSource of the file (e.g., `user`, `assistant`).\n\nFileRetrieveResponse object { id, bytes, container_id, 4 more } id: stringUnique identifier for the file.bytes: numberSize of the file in bytes.container_id: stringThe container this file belongs to.created_at: numberUnix timestamp (in seconds) when the file was created.formatunixtimeobject: stringThe type of this object (`container.file`).path: stringPath of the file in the container.source: stringSource of the file (e.g., `user`, `assistant`).", "znaku_textu": 5189, "slov": 652, "odkazu": 453, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:19", "sha256": "a1f68a4213a5d31630354e5599e30e53a9b4063870a9e070301d8c596b2700ff", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/containers/createContainers", "titulek": "Create container | OpenAI API Reference", "h1": "Create container", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/containers/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create container", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/containers/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Containers"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create container"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Create Container\n\n##### Body ParametersJSONExpand Collapse\n\nname : string\n\nName of the container to create.\n\nexpires_after: optional object { anchor, minutes } Container expiration time in seconds relative to the ‘anchor’ time.anchor: \"last_active_at\"Time anchor for the expiration time. Currently only ‘last_active_at’ is supported.minutes: number\n\nfile_ids : optional array of string\n\nIDs of files to copy to the container.\n\nmemory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"Optional memory limit for the container. Defaults to “1g”.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"\n\nnetwork_policy: optional [ContainerNetworkPolicyDisabled](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_disabled%20%3E%20(schema)) { type } or [ContainerNetworkPolicyAllowlist](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_allowlist%20%3E%20(schema)) { allowed_domains, type, domain_secrets } Network access policy for the container.One of the following:ContainerNetworkPolicyDisabled object { type } type: \"disabled\"Disable outbound network access. Always `disabled`.ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets } allowed_domains: array of stringA list of allowed domains when type is `allowlist`.type: \"allowlist\"Allow outbound network access only to specified domains. Always `allowlist`.domain_secrets: optional array of [ContainerNetworkPolicyDomainSecret](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_domain_secret%20%3E%20(schema)) { domain, name, value } Optional domain-scoped secrets for allowlisted domains.domain: stringThe domain associated with the secret.minLength1name: stringThe name of the secret to inject for the domain.minLength1value: stringThe secret value to inject for the domain.minLength1maxLength10485760\n\nskills: optional array of [SkillReference](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20skill_reference%20%3E%20(schema)) { skill_id, type, version } or [InlineSkill](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20inline_skill%20%3E%20(schema)) { description, name, source, type } An optional list of skills referenced by id or inline data.One of the following:SkillReference object { skill_id, type, version } skill_id: stringThe ID of the referenced skill.minLength1maxLength64type: \"skill_reference\"References a skill created with the /v1/skills endpoint.version: optional stringOptional skill version. Use a positive integer or ‘latest’. Omit for default.InlineSkill object { description, name, source, type } description: stringThe description of the skill.name: stringThe name of the skill.source: [InlineSkillSource](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20inline_skill_source%20%3E%20(schema)) { data, media_type, type } Inline skill payloaddata: stringBase64-encoded skill zip bundle.minLength1maxLength70254592media_type: \"application/zip\"The media type of the inline skill payload. Must be `application/zip`.type: \"base64\"The type of the inline skill source. Must be `base64`.type: \"inline\"Defines an inline skill for this request.\n\n##### ReturnsExpand Collapse\n\nid : string\n\nUnique identifier for the container.\n\ncreated_at : number\n\nUnix timestamp (in seconds) when the container was created.\n\nformat unixtime\n\nname : string\n\nName of the container.\n\nobject : string\n\nThe type of this object.\n\nstatus : string\n\nStatus of the container (e.g., active, deleted).\n\nexpires_after: optional object { anchor, minutes } The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.anchor: optional \"last_active_at\"The reference point for the expiration.minutes: optional numberThe number of minutes after the anchor before the container expires.\n\nlast_active_at : optional number\n\nUnix timestamp (in seconds) when the container was last active.\n\nformat unixtime\n\nmemory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"The memory limit configured for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"\n\nnetwork_policy: optional object { type, allowed_domains } Network access policy for the container.type: \"allowlist\" or \"disabled\"The network policy mode.One of the following:\"allowlist\"\"disabled\"allowed_domains: optional array of stringAllowed outbound domains when `type` is `allowlist`.\n\n### Create container\n\n```\ncurl https://api.openai.com/v1/containers \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"name\": \"My Container\", \"memory_limit\": \"4g\", \"skills\": [ { \"type\": \"skill_reference\", \"skill_id\": \"skill_4db6f1a2c9e73508b41f9da06e2c7b5f\" }, { \"type\": \"skill_reference\", \"skill_id\": \"openai-spreadsheets\", \"version\": \"latest\" } ], \"network_policy\": { \"type\": \"allowlist\", \"allowed_domains\": [\"api.buildkite.com\"] } }' \n```\n\n```\n{ \"id\": \"cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591\", \"object\": \"container\", \"created_at\": 1747857508, \"status\": \"running\", \"expires_after\": { \"anchor\": \"last_active_at\", \"minutes\": 20 }, \"last_active_at\": 1747857508, \"network_policy\": { \"type\": \"allowlist\", \"allowed_domains\": [\"api.buildkite.com\"] }, \"memory_limit\": \"4g\", \"name\": \"My Container\" } \n```\n\n##### Returns Examples\n\n```\n{ \"id\": \"cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591\", \"object\": \"container\", \"created_at\": 1747857508, \"status\": \"running\", \"expires_after\": { \"anchor\": \"last_active_at\", \"minutes\": 20 }, \"last_active_at\": 1747857508, \"network_policy\": { \"type\": \"allowlist\", \"allowed_domains\": [\"api.buildkite.com\"] }, \"memory_limit\": \"4g\", \"name\": \"My Container\" } \n```", "znaku_textu": 5704, "slov": 600, "odkazu": 428, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:18", "sha256": "0e5397852530a8a182831ddfdd32b62b1f7344b44d640aeccad1fc64bb628d69", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/containers/object", "titulek": "Containers | OpenAI API Reference", "h1": "Containers", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/containers/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Containers", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/containers/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["path", "string"], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nContainerCreateResponse object { id, created_at, name, 6 more } id: stringUnique identifier for the container.created_at: numberUnix timestamp (in seconds) when the container was created.formatunixtimename: stringName of the container.object: stringThe type of this object.status: stringStatus of the container (e.g., active, deleted).expires_after: optional object { anchor, minutes } The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.anchor: optional \"last_active_at\"The reference point for the expiration.minutes: optional numberThe number of minutes after the anchor before the container expires.last_active_at: optional numberUnix timestamp (in seconds) when the container was last active.formatunixtimememory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"The memory limit configured for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional object { type, allowed_domains } Network access policy for the container.type: \"allowlist\" or \"disabled\"The network policy mode.One of the following:\"allowlist\"\"disabled\"allowed_domains: optional array of stringAllowed outbound domains when `type` is `allowlist`.\n\nContainerListResponse object { id, created_at, name, 6 more } id: stringUnique identifier for the container.created_at: numberUnix timestamp (in seconds) when the container was created.formatunixtimename: stringName of the container.object: stringThe type of this object.status: stringStatus of the container (e.g., active, deleted).expires_after: optional object { anchor, minutes } The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.anchor: optional \"last_active_at\"The reference point for the expiration.minutes: optional numberThe number of minutes after the anchor before the container expires.last_active_at: optional numberUnix timestamp (in seconds) when the container was last active.formatunixtimememory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"The memory limit configured for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional object { type, allowed_domains } Network access policy for the container.type: \"allowlist\" or \"disabled\"The network policy mode.One of the following:\"allowlist\"\"disabled\"allowed_domains: optional array of stringAllowed outbound domains when `type` is `allowlist`.\n\nContainerRetrieveResponse object { id, created_at, name, 6 more } id: stringUnique identifier for the container.created_at: numberUnix timestamp (in seconds) when the container was created.formatunixtimename: stringName of the container.object: stringThe type of this object.status: stringStatus of the container (e.g., active, deleted).expires_after: optional object { anchor, minutes } The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.anchor: optional \"last_active_at\"The reference point for the expiration.minutes: optional numberThe number of minutes after the anchor before the container expires.last_active_at: optional numberUnix timestamp (in seconds) when the container was last active.formatunixtimememory_limit: optional \"1g\" or \"4g\" or \"16g\" or \"64g\"The memory limit configured for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional object { type, allowed_domains } Network access policy for the container.type: \"allowlist\" or \"disabled\"The network policy mode.One of the following:\"allowlist\"\"disabled\"allowed_domains: optional array of stringAllowed outbound domains when `type` is `allowlist`.\n\n##### ModelsExpand Collapse\n\nFileCreateResponse object { id, bytes, container_id, 4 more } id: stringUnique identifier for the file.bytes: numberSize of the file in bytes.container_id: stringThe container this file belongs to.created_at: numberUnix timestamp (in seconds) when the file was created.formatunixtimeobject: stringThe type of this object (`container.file`).path: stringPath of the file in the container.source: stringSource of the file (e.g., `user`, `assistant`).\n\nFileListResponse object { id, bytes, container_id, 4 more } id: stringUnique identifier for the file.bytes: numberSize of the file in bytes.container_id: stringThe container this file belongs to.created_at: numberUnix timestamp (in seconds) when the file was created.formatunixtimeobject: stringThe type of this object (`container.file`).path: stringPath of the file in the container.source: stringSource of the file (e.g., `user`, `assistant`).\n\nFileRetrieveResponse object { id, bytes, container_id, 4 more } id: stringUnique identifier for the file.bytes: numberSize of the file in bytes.container_id: stringThe container this file belongs to.created_at: numberUnix timestamp (in seconds) when the file was created.formatunixtimeobject: stringThe type of this object (`container.file`).path: stringPath of the file in the container.source: stringSource of the file (e.g., `user`, `assistant`).", "znaku_textu": 5189, "slov": 652, "odkazu": 453, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/containers", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:17", "sha256": "a1f68a4213a5d31630354e5599e30e53a9b4063870a9e070301d8c596b2700ff", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/conversations/create", "titulek": "Create a conversation | OpenAI API Reference", "h1": "Create a conversation", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/conversations/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create a conversation", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/conversations/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Conversations"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create a conversation"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Create a conversation.\n\n##### Body ParametersJSONExpand Collapse\n\nitems: optional array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, status, type } or [ResponseOutputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)) { id, content, role, 3 more } or 30 more or nullInitial items to include in the conversation context. You may add up to 20 items at a time.One of the following:EasyInputMessage object { content, role, phase, type } 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.content: string or [ResponseInputMessageContentList](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_message_content_list%20%3E%20(schema)) { , , } Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.One of the following:TextInput = stringA text input to the model.ResponseInputMessageContentList = array of [ResponseInputContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_content%20%3E%20(schema))A list of one or many input items to the model, containing different content\ntypes.One of the following:ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImage object { detail, type, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).detail: [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema))The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"type: \"input_image\"The type of the input item. Always `input_image`.file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.formaturiprompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFile object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional stringThe content of the file to be sent to the model.file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional stringThe URL of the file to be sent to the model.formaturifilename: optional stringThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"phase: optional \"commentary\" or \"final_answer\" or nullLabels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).\nFor models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend\nphase on all assistant messages — dropping it can degrade performance. Not used for user messages.One of the following:\"commentary\"\"final_answer\"type: optional \"message\"The type of the message input. Always `message`.Message object { content, role, status, type } 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.content: [ResponseInputMessageContentList](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_message_content_list%20%3E%20(schema)) { , , } A list of one or many input items to the model, containing different content\ntypes.One of the following:ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImage object { detail, type, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).detail: [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema))The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"type: \"input_image\"The type of the input item. Always `input_image`.file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.formaturiprompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFile object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional stringThe content of the file to be sent to the model.file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional stringThe URL of the file to be sent to the model.formaturifilename: optional stringThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.role: \"user\" or \"system\" or \"developer\"The role of the message input. One of `user`, `system`, or `developer`.One of the following:\"user\"\"system\"\"developer\"status: optional \"in_progress\" or \"completed\" or \"incomplete\"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.One of the following:\"in_progress\"\"completed\"\"incomplete\"type: optional \"message\"The type of the message input. Always set to `message`.ResponseOutputMessage object { id, content, role, 3 more } An output message from the model.id: stringThe unique ID of the output message.content: array of [ResponseOutputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)) { annotations, logprobs, text, type } or [ResponseOutputRefusal](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)) { refusal, type } The content of the output message.One of the following:ResponseOutputText object { annotations, logprobs, text, type } A text output from the model.annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type } The annotations of the text output.One of the following:FileCitation object { file_id, filename, index, type } A citation to a file.file_id: stringThe ID of the file.filename: stringThe filename of the file cited.index: numberThe index of the file in the list of files.type: \"file_citation\"The type of the file citation. Always `file_citation`.URLCitation object { end_index, start_index, title, 2 more } A citation for a web resource used to generate a model response.end_index: numberThe index of the last character of the URL citation in the message.start_index: numberThe index of the first character of the URL citation in the message.title: stringThe title of the web resource.type: \"url_citation\"The type of the URL citation. Always `url_citation`.url: stringThe URL of the web resource.formaturiContainerFileCitation object { container_id, end_index, file_id, 3 more } A citation for a container file used to generate a model response.container_id: stringThe ID of the container file.end_index: numberThe index of the last character of the container file citation in the message.file_id: stringThe ID of the file.filename: stringThe filename of the container file cited.start_index: numberThe index of the first character of the container file citation in the message.type: \"container_file_citation\"The type of the container file citation. Always `container_file_citation`.FilePath object { file_id, index, type } A path to a file.file_id: stringThe ID of the file.index: numberThe index of the file in the list of files.type: \"file_path\"The type of the file path. Always `file_path`.logprobs: array of object { token, bytes, logprob, top_logprobs } token: stringbytes: array of numberlogprob: numbertop_logprobs: array of object { token, bytes, logprob } token: stringbytes: array of numberlogprob: numbertext: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.ResponseOutputRefusal object { refusal, type } A refusal from the model.refusal: stringThe refusal explanation from the model.type: \"refusal\"The type of the refusal. Always `refusal`.role: \"assistant\"The role of the output message. Always `assistant`.status: \"in_progress\" or \"completed\" or \"incomplete\"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.One of the following:\"in_progress\"\"completed\"\"incomplete\"type: \"message\"The type of the output message. Always `message`.phase: optional \"commentary\" or \"final_answer\" or nullLabels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).\nFor models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend\nphase on all assistant messages — dropping it can degrade performance. Not used for user messages.One of the following:\"commentary\"\"final_answer\"FileSearchCall object { id, queries, status, 2 more } The results of a file search tool call. See the\n[file search guide](/api/docs/guides/tools-file-search) for more information.id: stringThe unique ID of the file search tool call.queries: array of stringThe queries used to search for files.status: \"in_progress\" or \"searching\" or \"completed\" or 2 moreThe status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,One of the following:\"in_progress\"\"searching\"\"completed\"\"incomplete\"\"failed\"type: \"file_search_call\"The type of the file search tool call. Always `file_search_call`.results: optional array of object { attributes, file_id, filename, 2 more } or nullThe results of the file search tool call.attributes: optional map[string or number or boolean] or nullSet 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.One of the following:stringnumberbooleanfile_id: optional stringThe unique ID of the file.filename: optional stringThe name of the file.score: optional numberThe relevance score of the file - a value between 0 and 1.formatfloattext: optional stringThe text that was retrieved from the file.ComputerCall object { id, call_id, pending_safety_checks, 4 more } A tool call to a computer use tool. See the\n[computer use guide](/api/docs/guides/tools-computer-use) for more information.id: stringThe unique ID of the computer call.call_id: stringAn identifier used when responding to the tool call with output.pending_safety_checks: array of object { id, code, message } The pending safety checks for the computer call.id: stringThe ID of the pending safety check.code: optional string or nullThe type of the pending safety check.message: optional string or nullDetails about the pending safety check.status: \"in_progress\" or \"completed\" or \"incomplete\"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.One of the following:\"in_progress\"\"completed\"\"incomplete\"type: \"computer_call\"The type of the computer call. Always `computer_call`.action: optional [ComputerAction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20computer_action%20%3E%20(schema))A click action.One of the following:Click object { button, type, x, 2 more } A click action.button: \"left\" or \"right\" or \"wheel\" or 2 moreIndicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.One of the following:\"left\"\"right\"\"wheel\"\"back\"\"forward\"type: \"click\"Specifies the event type. For a click action, this property is always `click`.x: numberThe x-coordinate where the click occurred.y: numberThe y-coordinate where the click occurred.keys: optional array of string or nullThe keys being held while clicking.DoubleClick object { keys, type, x, y } A double click action.keys: array of string or nullThe keys being held while double-clicking.type: \"double_click\"Specifies the event type. For a double click action, this property is always set to `double_click`.x: numberThe x-coordinate where the double click occurred.y: numberThe y-coordinate where the double click occurred.Drag object { path, type, keys } A drag action.path: array of object { x, y } An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg `[ { x: 100, y: 200 }, { x: 200, y: 300 } ]`x: numberThe x-coordinate.y: numberThe y-coordinate.type: \"drag\"Specifies the event type. For a drag action, this property is always set to `drag`.keys: optional array of string or nullThe keys being held while dragging the mouse.Keypress object { keys, type } A collection of keypresses the model would like to perform.keys: array of stringThe combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.type: \"keypress\"Specifies the event type. For a keypress action, this property is always set to `keypress`.Move object { type, x, y, keys } A mouse move action.type: \"move\"Specifies the event type. For a move action, this property is always set to `move`.x: numberThe x-coordinate to move to.y: numberThe y-coordinate to move to.keys: optional array of string or nullThe keys being held while moving the mouse.Screenshot object { type } A screenshot action.type: \"screenshot\"Specifies the event type. For a screenshot action, this property is always set to `screenshot`.Scroll object { scroll_x, scroll_y, type, 3 more } A scroll action.scroll_x: numberThe horizontal scroll distance.scroll_y: numberThe vertical scroll distance.type: \"scroll\"Specifies the event type. For a scroll action, this property is always set to `scroll`.x: numberThe x-coordinate where the scroll occurred.y: numberThe y-coordinate where the scroll occurred.keys: optional array of string or nullThe keys being held while scrolling.Type object { text, type } An action to type in text.text: stringThe text to type.type: \"type\"Specifies the event type. For a type action, this property is always set to `type`.Wait object { type } A wait action.type: \"wait\"Specifies the event type. For a wait action, this property is always set to `wait`.actions: optional [ComputerActionList](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20computer_action_list%20%3E%20(schema)) { Click, DoubleClick, Drag, 6 more } Flattened batched actions for `computer_use`. Each action includes an\n`type` discriminator and action-specific fields.One of the following:Click object { button, type, x, 2 more } A click action.button: \"left\" or \"right\" or \"wheel\" or 2 moreIndicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.One of the following:\"left\"\"right\"\"wheel\"\"back\"\"forward\"type: \"click\"Specifies the event type. For a click action, this property is always `click`.x: numberThe x-coordinate where the click occurred.y: numberThe y-coordinate where the click occurred.keys: optional array of string or nullThe keys being held while clicking.DoubleClick object { keys, type, x, y } A double click action.keys: array of string or nullThe keys being held while double-clicking.type: \"double_click\"Specifies the event type. For a double click action, this property is always set to `double_click`.x: numberThe x-coordinate where the double click occurred.y: numberThe y-coordinate where the double click occurred.Drag object { path, type, keys } A drag action.path: array of object { x, y } An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg `[ { x: 100, y: 200 }, { x: 200, y: 300 } ]`x: numberThe x-coordinate.y: numberThe y-coordinate.type: \"drag\"Specifies the event type. For a drag action, this property is always set to `drag`.keys: optional array of string or nullThe keys being held while dragging the mouse.Keypress object { keys, type } A collection of keypresses the model would like to perform.keys: array of stringThe combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.type: \"keypress\"Specifies the event type. For a keypress action, this property is always set to `keypress`.Move object { type, x, y, keys } A mouse move action.type: \"move\"Specifies the event type. For a move action, this property is always set to `move`.x: numberThe x-coordinate to move to.y: numberThe y-coordinate to move to.keys: optional array of string or nullThe keys being held while moving the mouse.Screenshot object { type } A screenshot action.type: \"screenshot\"Specifies the event type. For a screenshot action, this property is always set to `screenshot`.Scroll object { scroll_x, scroll_y, type, 3 more } A scroll action.scroll_x: numberThe horizontal scroll distance.scroll_y: numberThe vertical scroll distance.type: \"scroll\"Specifies the event type. For a scroll action, this property is always set to `scroll`.x: numberThe x-coordinate where the scroll occurred.y: numberThe y-coordinate where the scroll occurred.keys: optional array of string or nullThe keys being held while scrolling.Type object { text, type } An action to type in text.text: stringThe text to type.type: \"type\"Specifies the event type. For a type action, this property is always set to `type`.Wait object { type } A wait action.type: \"wait\"Specifies the event type. For a wait action, this property is always set to `wait`.ComputerCallOutput object { call_id, output, type, 3 more } The output of a computer tool call.call_id: stringThe ID of the computer tool call that produced the output.minLength1maxLength64output: [ResponseComputerToolCallOutputScreenshot](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_computer_tool_call_output_screenshot%20%3E%20(schema)) { type, file_id, image_url } A computer screenshot image used with the computer use tool.type: \"computer_screenshot\"Specifies the event type. For a computer screenshot, this property is\nalways set to `computer_screenshot`.file_id: optional stringThe identifier of an uploaded file that contains the screenshot.image_url: optional stringThe URL of the screenshot image.formaturitype: \"computer_call_output\"The type of the computer tool call output. Always `computer_call_output`.id: optional string or nullThe ID of the computer tool call output.acknowledged_safety_checks: optional array of object { id, code, message } or nullThe safety checks reported by the API that have been acknowledged by the developer.id: stringThe ID of the pending safety check.code: optional string or nullThe type of the pending safety check.message: optional string or nullDetails about the pending safety check.status: optional \"in_progress\" or \"completed\" or \"incomplete\" or nullThe status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.One of the following:\"in_progress\"\"completed\"\"incomplete\"WebSearchCall object { id, action, status, type } The results of a web search tool call. See the\n[web search guide](/api/docs/guides/tools-web-search) for more information.id: stringThe unique ID of the web search tool call.action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url } 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).One of the following:Search object { type, queries, query, sources } Action type “search” - Performs a web search query.type: \"search\"The action type.queries: optional array of stringThe search queries.Deprecatedquery: optional stringThe search query.sources: optional array of object { type, url } The sources used in the search.type: \"url\"The type of source. Always `url`.url: stringThe URL of the source.formaturiOpenPage object { type, url } Action type “open_page” - Opens a specific URL from search results.type: \"open_page\"The action type.url: optional string or nullThe URL opened by the model.formaturiFindInPage object { pattern, type, url } Action type “find_in_page”: Searches for a pattern within a loaded page.pattern: stringThe pattern or text to search for within the page.type: \"find_in_page\"The action type.url: stringThe URL of the page searched for the pattern.formaturistatus: \"in_progress\" or \"searching\" or \"completed\" or 2 moreThe status of the web search tool call.One of the following:\"in_progress\"\"searching\"\"completed\"\"failed\"\"incomplete\"type: \"web_search_call\"The type of the web search tool call. Always `web_search_call`.FunctionCall object { arguments, call_id, name, 6 more } A tool call to run a function. See the\n[function calling guide](/api/docs/guides/function-calling) for more information.arguments: stringA JSON string of the arguments to pass to the function.call_id: stringThe unique ID of the function tool call generated by the model.name: stringThe name of the function to run.type: \"function_call\"The type of the function tool call. Always `function_call`.id: optional stringThe unique ID of the function tool call.async: optional booleanWhether the function tool call runs asynchronously.caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.type: \"program\"namespace: optional stringThe namespace of the function to run.status: optional \"in_progress\" or \"completed\" or \"incomplete\"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.One of the following:\"in_progress\"\"completed\"\"incomplete\"FunctionCallOutput object { output, type, id, 5 more } The output of a function tool call.output: string or array of [ResponseInputTextContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text_content%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImageContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image_content%20%3E%20(schema)) { type, detail, file_id, 2 more } or [ResponseInputFileContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file_content%20%3E%20(schema)) { type, detail, file_data, 4 more } Text, image, or file output of the function tool call.One of the following:stringA JSON string of the output of the function tool call.array of [ResponseInputTextContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text_content%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImageContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image_content%20%3E%20(schema)) { type, detail, file_id, 2 more } or [ResponseInputFileContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file_content%20%3E%20(schema)) { type, detail, file_data, 4 more } An array of content outputs (text, image, file) for the function tool call.One of the following:ResponseInputTextContent object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.maxLength10485760type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } or nullMarks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImageContent object { type, detail, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)type: \"input_image\"The type of the input item. Always `input_image`.detail: optional [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema)) or nullThe detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.maxLength20971520formaturiprompt_cache_breakpoint: optional object { mode } or nullMarks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFileContent object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional string or nullThe base64-encoded data of the file to be sent to the model.maxLength73400320file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional string or nullThe URL of the file to be sent to the model.formaturifilename: optional string or nullThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } or nullMarks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.type: \"function_call_output\"The type of the function tool call output. Always `function_call_output`.id: optional string or nullThe unique ID of the function tool call output. Populated when this item is returned via API.call_id: optional string or nullThe unique ID of the function tool call generated by the model.minLength1maxLength64caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"The caller type. Always `direct`.Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.minLength1maxLength64type: \"program\"The caller type. Always `program`.name: optional string or nullThe name of the tool that produced the output.minLength1maxLength128namespace: optional string or nullThe namespace of the tool that produced the output.minLength1maxLength64status: optional \"in_progress\" or \"completed\" or \"incomplete\" or nullThe status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.One of the following:\"in_progress\"\"completed\"\"incomplete\"ToolSearchCall object { arguments, type, id, 3 more } arguments: unknownThe arguments supplied to the tool search call.type: \"tool_search_call\"The item type. Always `tool_search_call`.id: optional string or nullThe unique ID of this tool search call.call_id: optional string or nullThe unique ID of the tool search call generated by the model.minLength1maxLength64execution: optional \"server\" or \"client\"Whether tool search was executed by the server or by the client.One of the following:\"server\"\"client\"status: optional \"in_progress\" or \"completed\" or \"incomplete\" or nullThe status of the tool search call.One of the following:\"in_progress\"\"completed\"\"incomplete\"ToolSearchOutput object { tools, type, id, 3 more } tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreThe loaded tool definitions returned by the tool search output.One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: \"function\"The type of the function tool. Always `function`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this function.FileSearch object { type, vector_store_ids, filters, 2 more } A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).type: \"file_search\"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional [ComparisonFilter](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20comparison_filter%20%3E%20(schema)) { key, type, value } or [CompoundFilter](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20compound_filter%20%3E%20(schema)) { filters, type } or nullA filter to apply.One of the following:ComparisonFilter object { key, type, value } A filter used to compare a specified attribute key to a given value using a defined comparison operation.key: stringThe key to compare against the value.type: \"eq\" or \"ne\" or \"gt\" or 5 moreSpecifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. `eq`: equals `ne`: not equal `gt`: greater than `gte`: greater than or equal `lt`: less than `lte`: less than or equal `in`: in `nin`: not in One of the following:\"eq\"\"ne\"\"gt\"\"gte\"\"lt\"\"lte\"\"in\"\"nin\"value: string or number or boolean or array of The value to compare against the attribute key; supports string, number, or boolean types.One of the following:stringnumberbooleanOne of the following:CompoundFilter object { filters, type } Combine multiple filters using `and` or `or`.filters: array of or unknownArray of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.One of the following:ComparisonFilter unknowntype: \"and\" or \"or\"Type of operation: `and` or `or`.One of the following:\"and\"\"or\"max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.ranking_options: optional object { hybrid_search, ranker, score_threshold } Ranking options for search.hybrid_search: optional object { embedding_weight, text_weight } Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.embedding_weight: numberThe weight of the embedding in the reciprocal ranking fusion.text_weight: numberThe weight of the text in the reciprocal ranking fusion.ranker: optional \"auto\" or \"default-2024-11-15\"The ranker to use for the file search.One of the following:\"auto\"\"default-2024-11-15\"score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.Computer object { type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).type: \"computer\"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).display_height: numberThe height of the computer display.display_width: numberThe width of the computer display.environment: \"windows\" or \"mac\" or \"linux\" or 2 moreThe type of computer environment to control.One of the following:\"windows\"\"mac\"\"linux\"\"ubuntu\"\"browser\"type: \"computer_use_preview\"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/api/docs/guides/tools-web-search).type: \"web_search\" or \"web_search_2025_08_26\"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:\"web_search\"\"web_search_2025_08_26\"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { allowed_domains } or nullFilters for the search.allowed_domains: optional array of string or nullAllowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well. Example: `[\"pubmed.ncbi.nlm.nih.gov\"]`search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { city, country, region, 2 more } or nullThe approximate location of the user.city: optional string or nullFree text input for the city of the user, e.g. `San Francisco`.country: optional string or nullThe two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional string or nullFree text input for the region of the user, e.g. `California`.timezone: optional string or nullThe [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional \"approximate\"The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { type, file_ids, memory_limit, network_policy } The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy } Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.type: \"auto\"Always `auto`.file_ids: optional array of stringAn optional list of uploaded files to make available to your code.memory_limit: optional or nullThe memory limit for the code interpreter container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional [ContainerNetworkPolicyDisabled](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_disabled%20%3E%20(schema)) { } or [ContainerNetworkPolicyAllowlist](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_allowlist%20%3E%20(schema)) { } Network access policy for the container.One of the following:ContainerNetworkPolicyDisabled ContainerNetworkPolicyAllowlist type: \"code_interpreter\"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"ProgrammaticToolCalling object { type } type: \"programmatic_tool_calling\"The type of the tool. Always `programmatic_tool_calling`.ImageGeneration object { type, action, background, 9 more } A tool that generates images using the GPT image models.type: \"image_generation\"The type of the image generation tool. Always `image_generation`.action: optional \"generate\" or \"edit\" or \"auto\"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:\"generate\"\"edit\"\"auto\"background: optional \"transparent\" or \"opaque\" or \"auto\"Set the background of the generated image. One of `transparent`, `opaque`,\nor `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including\ntheir `2026-09-08` snapshots, support `opaque` and `transparent`\nbackgrounds. Transparent backgrounds are available for supported GPT Image\nmodels. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in\npreview. When using `transparent`, set the output format to `png` or `webp`.\nDefault: `auto`.One of the following:\"transparent\"\"opaque\"\"auto\"input_fidelity: optional \"high\" or \"low\" or nullControl how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:\"high\"\"low\"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or \"gpt-image-1\" or \"gpt-image-1-mini\" or \"gpt-image-1.5\" or 6 moreThe image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:string\"gpt-image-1\" or \"gpt-image-1-mini\" or \"gpt-image-1.5\" or 6 moreThe image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:\"gpt-image-1\"\"gpt-image-1-mini\"\"gpt-image-1.5\"\"gpt-image-2\"\"gpt-image-2-2026-04-21\"\"gpt-image-2.5-sunburst\"\"gpt-image-2.5-sunburst-2026-09-08\"\"gpt-image-2.5-flare\"\"gpt-image-2.5-flare-2026-09-08\"moderation: optional \"auto\" or \"low\"Moderation level for the generated image. Default: `auto`.One of the following:\"auto\"\"low\"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.One of the following:\"png\"\"webp\"\"jpeg\"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional \"low\" or \"medium\" or \"high\" or 3 moreThe quality of the generated image. The GPT image models support `low`,\n`medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,\nincluding their `2026-09-08` snapshots, also support `xhigh` and `max`.\nDefault: `auto`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: optional string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"LocalShell object { type } A tool that allows the model to execute shell commands in a local environment.type: \"local_shell\"The type of the local shell tool. Always `local_shell`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: \"shell\"The type of the shell tool. Always `shell`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"environment: optional [ContainerAuto](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_auto%20%3E%20(schema)) { type, file_ids, memory_limit, 2 more } or [LocalEnvironment](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20local_environment%20%3E%20(schema)) { type, skills } or [ContainerReference](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_reference%20%3E%20(schema)) { container_id, type } or nullOne of the following:ContainerAuto object { type, file_ids, memory_limit, 2 more } type: \"container_auto\"Automatically creates a container for this requestfile_ids: optional array of stringAn optional list of uploaded files to make available to your code.memory_limit: optional or nullThe memory limit for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional [ContainerNetworkPolicyDisabled](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_disabled%20%3E%20(schema)) { } or [ContainerNetworkPolicyAllowlist](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_allowlist%20%3E%20(schema)) { } Network access policy for the container.One of the following:ContainerNetworkPolicyDisabled ContainerNetworkPolicyAllowlist skills: optional array of or An optional list of skills referenced by id or inline data.One of the following:SkillReference InlineSkill LocalEnvironment object { type, skills } type: \"local\"Use a local computer environment.skills: optional array of [LocalSkill](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20local_skill%20%3E%20(schema)) { description, name, path } An optional list of skills.description: stringThe description of the skill.name: stringThe name of the skill.path: stringThe path to the directory containing the skill.ContainerReference object { container_id, type } container_id: stringThe ID of the referenced container.type: \"container_reference\"References a container created with the /v1/containers endpointCustom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { definition, syntax, type } A grammar defined by the user.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.Namespace object { description, name, tools, type } Groups function/custom tools under a shared namespace.description: stringA description of the namespace shown to the model.name: stringThe namespace name used in tool calls (for example, `crm`).minLength1tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more } The function/custom tools available inside this namespace.One of the following:Function object { name, type, allowed_callers, 6 more } name: stringminLength1maxLength128type: \"function\"allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this function should be deferred and discovered via tool search.description: optional string or nulloutput_schema: optional map[unknown] or nullA JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.parameters: optional unknown or nullstrict: optional boolean or nullWhether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.One of the following:Text Grammar type: \"namespace\"The type of the tool. Always `namespace`.ToolSearch object { type, description, execution, parameters } Hosted or BYOT tool search configuration for deferred tools.type: \"tool_search\"The type of the tool. Always `tool_search`.description: optional string or nullDescription shown to the model for a client-executed tool search tool.execution: optional \"server\" or \"client\"Whether tool search is executed by the server or by the client.One of the following:\"server\"\"client\"parameters: optional unknown or nullParameter schema for a client-executed tool search tool.WebSearchPreview object { type, search_content_types, search_context_size, user_location } This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: \"web_search_preview\" or \"web_search_preview_2025_03_11\"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:\"web_search_preview\"\"web_search_preview_2025_03_11\"search_content_types: optional array of \"text\" or \"image\"One of the following:\"text\"\"image\"search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { type, city, country, 2 more } or nullThe user’s location.type: \"approximate\"The type of location approximation. Always `approximate`.city: optional string or nullFree text input for the city of the user, e.g. `San Francisco`.country: optional string or nullThe two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional string or nullFree text input for the region of the user, e.g. `California`.timezone: optional string or nullThe [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: \"apply_patch\"The type of the tool. Always `apply_patch`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"type: \"tool_search_output\"The item type. Always `tool_search_output`.id: optional string or nullThe unique ID of this tool search output.call_id: optional string or nullThe unique ID of the tool search call generated by the model.minLength1maxLength64execution: optional \"server\" or \"client\"Whether tool search was executed by the server or by the client.One of the following:\"server\"\"client\"status: optional \"in_progress\" or \"completed\" or \"incomplete\" or nullThe status of the tool search output.One of the following:\"in_progress\"\"completed\"\"incomplete\"AdditionalTools object { role, tools, type, id } role: \"developer\"The role that provided the additional tools. Only `developer` is supported.tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreA list of additional tools made available at this item.One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: \"function\"The type of the function tool. Always `function`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this function.FileSearch object { type, vector_store_ids, filters, 2 more } A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).type: \"file_search\"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional [ComparisonFilter](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20comparison_filter%20%3E%20(schema)) { key, type, value } or [CompoundFilter](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20compound_filter%20%3E%20(schema)) { filters, type } or nullA filter to apply.One of the following:ComparisonFilter object { key, type, value } A filter used to compare a specified attribute key to a given value using a defined comparison operation.key: stringThe key to compare against the value.type: \"eq\" or \"ne\" or \"gt\" or 5 moreSpecifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. `eq`: equals `ne`: not equal `gt`: greater than `gte`: greater than or equal `lt`: less than `lte`: less than or equal `in`: in `nin`: not in One of the following:\"eq\"\"ne\"\"gt\"\"gte\"\"lt\"\"lte\"\"in\"\"nin\"value: string or number or boolean or array of The value to compare against the attribute key; supports string, number, or boolean types.One of the following:stringnumberbooleanOne of the following:CompoundFilter object { filters, type } Combine multiple filters using `and` or `or`.filters: array of or unknownArray of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.One of the following:ComparisonFilter unknowntype: \"and\" or \"or\"Type of operation: `and` or `or`.One of the following:\"and\"\"or\"max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.ranking_options: optional object { hybrid_search, ranker, score_threshold } Ranking options for search.hybrid_search: optional object { embedding_weight, text_weight } Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.embedding_weight: numberThe weight of the embedding in the reciprocal ranking fusion.text_weight: numberThe weight of the text in the reciprocal ranking fusion.ranker: optional \"auto\" or \"default-2024-11-15\"The ranker to use for the file search.One of the following:\"auto\"\"default-2024-11-15\"score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.Computer object { type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).type: \"computer\"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).display_height: numberThe height of the computer display.display_width: numberThe width of the computer display.environment: \"windows\" or \"mac\" or \"linux\" or 2 moreThe type of computer environment to control.One of the following:\"windows\"\"mac\"\"linux\"\"ubuntu\"\"browser\"type: \"computer_use_preview\"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/api/docs/guides/tools-web-search).type: \"web_search\" or \"web_search_2025_08_26\"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:\"web_search\"\"web_search_2025_08_26\"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { allowed_domains } or nullFilters for the search.allowed_domains: optional array of string or nullAllowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well. Example: `[\"pubmed.ncbi.nlm.nih.gov\"]`search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { city, country, region, 2 more } or nullThe approximate location of the user.city: optional string or nullFree text input for the city of the user, e.g. `San Francisco`.country: optional string or nullThe two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional string or nullFree text input for the region of the user, e.g. `California`.timezone: optional string or nullThe [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional \"approximate\"The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { type, file_ids, memory_limit, network_policy } The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy } Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.type: \"auto\"Always `auto`.file_ids: optional array of stringAn optional list of uploaded files to make available to your code.memory_limit: optional or nullThe memory limit for the code interpreter container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional [ContainerNetworkPolicyDisabled](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_disabled%20%3E%20(schema)) { } or [ContainerNetworkPolicyAllowlist](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_allowlist%20%3E%20(schema)) { } Network access policy for the container.One of the following:ContainerNetworkPolicyDisabled ContainerNetworkPolicyAllowlist type: \"code_interpreter\"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"ProgrammaticToolCalling object { type } type: \"programmatic_tool_calling\"The type of the tool. Always `programmatic_tool_calling`.ImageGeneration object { type, action, background, 9 more } A tool that generates images using the GPT image models.type: \"image_generation\"The type of the image generation tool. Always `image_generation`.action: optional \"generate\" or \"edit\" or \"auto\"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:\"generate\"\"edit\"\"auto\"background: optional \"transparent\" or \"opaque\" or \"auto\"Set the background of the generated image. One of `transparent`, `opaque`,\nor `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including\ntheir `2026-09-08` snapshots, support `opaque` and `transparent`\nbackgrounds. Transparent backgrounds are available for supported GPT Image\nmodels. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in\npreview. When using `transparent`, set the output format to `png` or `webp`.\nDefault: `auto`.One of the following:\"transparent\"\"opaque\"\"auto\"input_fidelity: optional \"high\" or \"low\" or nullControl how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:\"high\"\"low\"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or \"gpt-image-1\" or \"gpt-image-1-mini\" or \"gpt-image-1.5\" or 6 moreThe image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:string\"gpt-image-1\" or \"gpt-image-1-mini\" or \"gpt-image-1.5\" or 6 moreThe image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:\"gpt-image-1\"\"gpt-image-1-mini\"\"gpt-image-1.5\"\"gpt-image-2\"\"gpt-image-2-2026-04-21\"\"gpt-image-2.5-sunburst\"\"gpt-image-2.5-sunburst-2026-09-08\"\"gpt-image-2.5-flare\"\"gpt-image-2.5-flare-2026-09-08\"moderation: optional \"auto\" or \"low\"Moderation level for the generated image. Default: `auto`.One of the following:\"auto\"\"low\"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.One of the following:\"png\"\"webp\"\"jpeg\"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional \"low\" or \"medium\" or \"high\" or 3 moreThe quality of the generated image. The GPT image models support `low`,\n`medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,\nincluding their `2026-09-08` snapshots, also support `xhigh` and `max`.\nDefault: `auto`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: optional string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"LocalShell object { type } A tool that allows the model to execute shell commands in a local environment.type: \"local_shell\"The type of the local shell tool. Always `local_shell`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: \"shell\"The type of the shell tool. Always `shell`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"environment: optional [ContainerAuto](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_auto%20%3E%20(schema)) { type, file_ids, memory_limit, 2 more } or [LocalEnvironment](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20local_environment%20%3E%20(schema)) { type, skills } or [ContainerReference](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_reference%20%3E%20(schema)) { container_id, type } or nullOne of the following:ContainerAuto object { type, file_ids, memory_limit, 2 more } type: \"container_auto\"Automatically creates a container for this requestfile_ids: optional array of stringAn optional list of uploaded files to make available to your code.memory_limit: optional or nullThe memory limit for the container.One of the following:\"1g\"\"4g\"\"16g\"\"64g\"network_policy: optional [ContainerNetworkPolicyDisabled](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_disabled%20%3E%20(schema)) { } or [ContainerNetworkPolicyAllowlist](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_network_policy_allowlist%20%3E%20(schema)) { } Network access policy for the container.One of the following:ContainerNetworkPolicyDisabled ContainerNetworkPolicyAllowlist skills: optional array of or An optional list of skills referenced by id or inline data.One of the following:SkillReference InlineSkill LocalEnvironment object { type, skills } type: \"local\"Use a local computer environment.skills: optional array of [LocalSkill](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20local_skill%20%3E%20(schema)) { description, name, path } An optional list of skills.description: stringThe description of the skill.name: stringThe name of the skill.path: stringThe path to the directory containing the skill.ContainerReference object { container_id, type } container_id: stringThe ID of the referenced container.type: \"container_reference\"References a container created with the /v1/containers endpointCustom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.One of the following:Text object { type } Unconstrained free-form text.type: \"text\"Unconstrained text format. Always `text`.Grammar object { definition, syntax, type } A grammar defined by the user.definition: stringThe grammar definition.syntax: \"lark\" or \"regex\"The syntax of the grammar definition. One of `lark` or `regex`.One of the following:\"lark\"\"regex\"type: \"grammar\"Grammar format. Always `grammar`.Namespace object { description, name, tools, type } Groups function/custom tools under a shared namespace.description: stringA description of the namespace shown to the model.name: stringThe namespace name used in tool calls (for example, `crm`).minLength1tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more } The function/custom tools available inside this namespace.One of the following:Function object { name, type, allowed_callers, 6 more } name: stringminLength1maxLength128type: \"function\"allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this function should be deferred and discovered via tool search.description: optional string or nulloutput_schema: optional map[unknown] or nullA JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.parameters: optional unknown or nullstrict: optional boolean or nullWhether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.One of the following:Text Grammar type: \"namespace\"The type of the tool. Always `namespace`.ToolSearch object { type, description, execution, parameters } Hosted or BYOT tool search configuration for deferred tools.type: \"tool_search\"The type of the tool. Always `tool_search`.description: optional string or nullDescription shown to the model for a client-executed tool search tool.execution: optional \"server\" or \"client\"Whether tool search is executed by the server or by the client.One of the following:\"server\"\"client\"parameters: optional unknown or nullParameter schema for a client-executed tool search tool.WebSearchPreview object { type, search_content_types, search_context_size, user_location } This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: \"web_search_preview\" or \"web_search_preview_2025_03_11\"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:\"web_search_preview\"\"web_search_preview_2025_03_11\"search_content_types: optional array of \"text\" or \"image\"One of the following:\"text\"\"image\"search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { type, city, country, 2 more } or nullThe user’s location.type: \"approximate\"The type of location approximation. Always `approximate`.city: optional string or nullFree text input for the city of the user, e.g. `San Francisco`.country: optional string or nullThe two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional string or nullFree text input for the region of the user, e.g. `California`.timezone: optional string or nullThe [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: \"apply_patch\"The type of the tool. Always `apply_patch`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"type: \"additional_tools\"The item type. Always `additional_tools`.id: optional string or nullThe unique ID of this additional tools item.ConfigurationUpdate object { type, id, reasoning } An update to the conversation’s response configuration. The configuration\nremains in effect for subsequent responses until it is replaced by another\nconfiguration update.type: \"configuration_update\"The item type. Always `configuration_update`.id: optional string or nullThe unique ID of the configuration update item.reasoning: optional object { effort } Updates to reasoning configuration. Only effort is supported.effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullThe reasoning effort to use for subsequent responses until another\nconfiguration update replaces it.One of the following:\"none\"\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\"max\"Reasoning object { id, summary, type, 3 more } 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](/api/docs/guides/conversation-state).id: stringThe unique identifier of the reasoning content.summary: array of [SummaryTextContent](/api/reference/resources/conversations#(resource)%20conversations%20%3E%20(model)%20summary_text_content%20%3E%20(schema)) { text, type } Reasoning summary content.text: stringA summary of the reasoning output from the model so far.type: \"summary_text\"The type of the object. Always `summary_text`.type: \"reasoning\"The type of the object. Always `reasoning`.content: optional array of object { text, type } Reasoning text content.text: stringThe reasoning text from the model.type: \"reasoning_text\"The type of the reasoning text. Always `reasoning_text`.encrypted_content: optional string or nullThe encrypted content of the reasoning item. This is populated by default\nfor reasoning items returned by `POST /v1/responses` and WebSocket\n`response.create` requests. When streaming, use the completed reasoning item and its\n`encrypted_content` from the `response.output_item.done` event in\nsubsequent requests. The `encrypted_content` in\n`response.output_item.added` may be incomplete. This is especially\nimportant when `store` is `false` or when using Zero Data Retention.status: optional \"in_progress\" or \"completed\" or \"incomplete\"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.One of the following:\"in_progress\"\"completed\"\"incomplete\"Compaction object { encrypted_content, type, id } A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).encrypted_content: stringThe encrypted content of the compaction summary.maxLength20971520type: \"compaction\"The type of the item. Always `compaction`.id: optional string or nullThe ID of the compaction item.ImageGenerationCall object { id, result, status, 7 more } An image generation request made by the model.id: stringThe unique ID of the image generation call.result: string or nullThe generated image encoded in base64.status: \"in_progress\" or \"completed\" or \"generating\" or \"failed\"The status of the image generation call.One of the following:\"in_progress\"\"completed\"\"generating\"\"failed\"type: \"image_generation_call\"The type of the image generation call. Always `image_generation_call`.action: optional \"generate\" or \"edit\" or \"auto\" or nullThe action used for image generation.One of the following:\"generate\"\"edit\"\"auto\"background: optional \"transparent\" or \"opaque\" or \"auto\" or nullThe background setting used for generation.One of the following:\"transparent\"\"opaque\"\"auto\"output_format: optional \"png\" or \"webp\" or \"jpeg\" or nullThe output format used for generation.One of the following:\"png\"\"webp\"\"jpeg\"quality: optional \"low\" or \"medium\" or \"high\" or 3 more or nullThe quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"revised_prompt: optional string or nullThe prompt that was used after any model prompt rewriting.size: optional string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or nullThe image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"CodeInterpreterCall object { id, code, container_id, 3 more } A tool call to run code.id: stringThe unique ID of the code interpreter tool call.code: string or nullThe code to run, or null if not available.container_id: stringThe ID of the container used to run the code.outputs: array of object { logs, type } or object { type, url } or nullThe outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.One of the following:Logs object { logs, type } The logs output from the code interpreter.logs: stringThe logs output from the code interpreter.type: \"logs\"The type of the output. Always `logs`.Image object { type, url } The image output from the code interpreter.type: \"image\"The type of the output. Always `image`.url: stringThe URL of the image output from the code interpreter.formaturistatus: \"in_progress\" or \"completed\" or \"incomplete\" or 2 moreThe status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.One of the following:\"in_progress\"\"completed\"\"incomplete\"\"interpreting\"\"failed\"type: \"code_interpreter_call\"The type of the code interpreter tool call. Always `code_interpreter_call`.LocalShellCall object { id, action, call_id, 2 more } A tool call to run a command on the local shell.id: stringThe unique ID of the local shell call.action: object { command, env, type, 3 more } Execute a shell command on the server.command: array of stringThe command to run.env: map[string]Environment variables to set for the command.type: \"exec\"The type of the local shell action. Always `exec`.timeout_ms: optional number or nullOptional timeout in milliseconds for the command.user: optional string or nullOptional user to run the command as.working_directory: optional string or nullOptional working directory to run the command in.call_id: stringThe unique ID of the local shell tool call generated by the model.status: \"in_progress\" or \"completed\" or \"incomplete\"The status of the local shell call.One of the following:\"in_progress\"\"completed\"\"incomplete\"type: \"local_shell_call\"The type of the local shell call. Always `local_shell_call`.LocalShellCallOutput object { id, output, type, status } The output of a local shell tool call.id: stringThe unique ID of the local shell tool call generated by the model.output: stringA JSON string of the output of the local shell tool call.type: \"local_shell_call_output\"The type of the local shell tool call output. Always `local_shell_call_output`.status: optional \"in_progress\" or \"completed\" or \"incomplete\" or nullThe status of the item. One of `in_progress`, `completed`, or `incomplete`.One of the following:\"in_progress\"\"completed\"\"incomplete\"ShellCall object { action, call_id, type, 4 more } A tool representing a request to execute one or more shell commands.action: object { commands, max_output_length, timeout_ms } The shell commands and limits that describe how to run the tool call.commands: array of stringOrdered shell commands for the execution environment to run.max_output_length: optional number or nullMaximum number of UTF-8 characters to capture from combined stdout and stderr output.timeout_ms: optional number or nullMaximum wall-clock time in milliseconds to allow the shell commands to run.call_id: stringThe unique ID of the shell tool call generated by the model.minLength1maxLength64type: \"shell_call\"The type of the item. Always `shell_call`.id: optional string or nullThe unique ID of the shell tool call. Populated when this item is returned via API.caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"The caller type. Always `direct`.Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.minLength1maxLength64type: \"program\"The caller type. Always `program`.environment: optional [LocalEnvironment](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20local_environment%20%3E%20(schema)) { type, skills } or [ContainerReference](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20container_reference%20%3E%20(schema)) { container_id, type } or nullThe environment to execute the shell commands in.One of the following:LocalEnvironment object { type, skills } type: \"local\"Use a local computer environment.skills: optional array of [LocalSkill](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20local_skill%20%3E%20(schema)) { description, name, path } An optional list of skills.description: stringThe description of the skill.name: stringThe name of the skill.path: stringThe path to the directory containing the skill.ContainerReference object { container_id, type } container_id: stringThe ID of the referenced container.type: \"container_reference\"References a container created with the /v1/containers endpointstatus: optional \"in_progress\" or \"completed\" or \"incomplete\" or nullThe status of the shell call. One of `in_progress`, `completed`, or `incomplete`.One of the following:\"in_progress\"\"completed\"\"incomplete\"ShellCallOutput object { call_id, output, type, 4 more } The streamed output items emitted by a shell tool call.call_id: stringThe unique ID of the shell tool call generated by the model.minLength1maxLength64output: array of [ResponseFunctionShellCallOutputContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_function_shell_call_output_content%20%3E%20(schema)) { outcome, stderr, stdout } Captured chunks of stdout and stderr output, along with their associated outcomes.outcome: object { type } or object { exit_code, type } The exit or timeout outcome associated with this shell call.One of the following:Timeout object { type } Indicates that the shell call exceeded its configured time limit.type: \"timeout\"The outcome type. Always `timeout`.Exit object { exit_code, type } Indicates that the shell commands finished and returned an exit code.exit_code: numberThe exit code returned by the shell process.type: \"exit\"The outcome type. Always `exit`.stderr: stringCaptured stderr output for the shell call.maxLength10485760stdout: stringCaptured stdout output for the shell call.maxLength10485760type: \"shell_call_output\"The type of the item. Always `shell_call_output`.id: optional string or nullThe unique ID of the shell tool call output. Populated when this item is returned via API.caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"The caller type. Always `direct`.Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.minLength1maxLength64type: \"program\"The caller type. Always `program`.max_output_length: optional number or nullThe maximum number of UTF-8 characters captured for this shell call’s combined output.status: optional \"in_progress\" or \"completed\" or \"incomplete\" or nullThe status of the shell call output.One of the following:\"in_progress\"\"completed\"\"incomplete\"ApplyPatchCall object { call_id, operation, status, 3 more } A tool call representing a request to create, delete, or update files using diff patches.call_id: stringThe unique ID of the apply patch tool call generated by the model.minLength1maxLength64operation: object { diff, path, type } or object { path, type } or object { diff, path, type } The specific create, delete, or update instruction for the apply_patch tool call.One of the following:CreateFile object { diff, path, type } Instruction for creating a new file via the apply_patch tool.diff: stringUnified diff content to apply when creating the file.maxLength10485760path: stringPath of the file to create relative to the workspace root.minLength1type: \"create_file\"The operation type. Always `create_file`.DeleteFile object { path, type } Instruction for deleting an existing file via the apply_patch tool.path: stringPath of the file to delete relative to the workspace root.minLength1type: \"delete_file\"The operation type. Always `delete_file`.UpdateFile object { diff, path, type } Instruction for updating an existing file via the apply_patch tool.diff: stringUnified diff content to apply to the existing file.maxLength10485760path: stringPath of the file to update relative to the workspace root.minLength1type: \"update_file\"The operation type. Always `update_file`.status: \"in_progress\" or \"completed\"The status of the apply patch tool call. One of `in_progress` or `completed`.One of the following:\"in_progress\"\"completed\"type: \"apply_patch_call\"The type of the item. Always `apply_patch_call`.id: optional string or nullThe unique ID of the apply patch tool call. Populated when this item is returned via API.caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"The caller type. Always `direct`.Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.minLength1maxLength64type: \"program\"The caller type. Always `program`.ApplyPatchCallOutput object { call_id, status, type, 3 more } The streamed output emitted by an apply patch tool call.call_id: stringThe unique ID of the apply patch tool call generated by the model.minLength1maxLength64status: \"completed\" or \"failed\"The status of the apply patch tool call output. One of `completed` or `failed`.One of the following:\"completed\"\"failed\"type: \"apply_patch_call_output\"The type of the item. Always `apply_patch_call_output`.id: optional string or nullThe unique ID of the apply patch tool call output. Populated when this item is returned via API.caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"The caller type. Always `direct`.Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.minLength1maxLength64type: \"program\"The caller type. Always `program`.output: optional string or nullOptional human-readable log text from the apply patch tool (e.g., patch results or errors).maxLength10485760McpListTools object { id, server_label, tools, 2 more } A list of tools available on an MCP server.id: stringThe unique ID of the list.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.error: optional string or nullError message if the server could not list tools.McpApprovalRequest object { id, arguments, name, 2 more } A request for human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.McpApprovalResponse object { approval_request_id, approve, type, 2 more } A response to an MCP approval request.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.id: optional string or nullThe unique ID of the approval responsereason: optional string or nullOptional reason for the decision.McpCall object { id, arguments, name, 6 more } An invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullUnique 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.error: optional [McpToolCallError](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20mcp_tool_call_error%20%3E%20(schema)) or nullThe error from the tool call, if any.One of the following:McpProtocolError object { code, message, type } code: numbermessage: stringtype: \"mcp_protocol_error\"McpToolExecutionError object { content, type } content: unknowntype: \"mcp_tool_execution_error\"HTTPError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.status: optional \"in_progress\" or \"completed\" or \"incomplete\" or 2 moreThe status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.One of the following:\"in_progress\"\"completed\"\"incomplete\"\"calling\"\"failed\"CustomToolCallOutput object { call_id, output, type, 2 more } The output of a custom tool call from your code, being sent back to the model.call_id: stringThe call ID, used to map this custom tool call output to a custom tool call.output: string or array of [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image%20%3E%20(schema)) { detail, type, file_id, 2 more } or [ResponseInputFile](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file%20%3E%20(schema)) { type, detail, file_data, 4 more } The output from the custom tool call generated by your code.\nCan be a string or an list of output content.One of the following:StringOutput = stringA string of the output of the custom tool call.OutputContentList = array of [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image%20%3E%20(schema)) { detail, type, file_id, 2 more } or [ResponseInputFile](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file%20%3E%20(schema)) { type, detail, file_data, 4 more } Text, image, or file output of the custom tool call.One of the following:ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImage object { detail, type, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).detail: [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema))The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"type: \"input_image\"The type of the input item. Always `input_image`.file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.formaturiprompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFile object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional stringThe content of the file to be sent to the model.file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional stringThe URL of the file to be sent to the model.formaturifilename: optional stringThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.type: \"custom_tool_call_output\"The type of the custom tool call output. Always `custom_tool_call_output`.id: optional stringThe unique ID of the custom tool call output in the OpenAI platform.caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"The caller type. Always `direct`.Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.minLength1maxLength64type: \"program\"The caller type. Always `program`.CustomToolCall object { call_id, input, name, 5 more } A call to a custom tool created by the model.call_id: stringAn identifier used to map this custom tool call to a tool call output.input: stringThe input for the custom tool call generated by the model.name: stringThe name of the custom tool being called.type: \"custom_tool_call\"The type of the custom tool call. Always `custom_tool_call`.id: optional stringThe unique ID of the custom tool call in the OpenAI platform.async: optional booleanWhether the custom tool call runs asynchronously.caller: optional object { type } or object { caller_id, type } or nullThe execution context that produced this tool call.One of the following:Direct object { type } type: \"direct\"Program object { caller_id, type } caller_id: stringThe call ID of the program item that produced this tool call.type: \"program\"namespace: optional stringThe namespace of the custom tool being called.CompactionTrigger object { type, id } Compacts the current context. Must be the final input item.type: \"compaction_trigger\"The type of the item. Always `compaction_trigger`.id: optional string or nullThe unique ID of this compaction trigger.ItemReference object { id, type } An internal identifier for an item to reference.id: stringThe ID of the item to reference.type: optional \"item_reference\" or nullThe type of item to reference. Always `item_reference`.Program object { id, call_id, code, 2 more } id: stringThe unique ID of this program item.call_id: stringThe stable call ID of the program item.minLength1maxLength64code: stringThe JavaScript source executed by programmatic tool calling.maxLength10485760fingerprint: stringOpaque program replay fingerprint that must be round-tripped.maxLength10485760type: \"program\"The item type. Always `program`.ProgramOutput object { id, call_id, result, 2 more } id: stringThe unique ID of this program output item.call_id: stringThe call ID of the program item.minLength1maxLength64result: stringThe result produced by the program item.maxLength10485760status: \"completed\" or \"incomplete\"The terminal status of the program output.One of the following:\"completed\"\"incomplete\"type: \"program_output\"The item type. Always `program_output`.\n\nmetadata : optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or null\n\nSet 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\n##### ReturnsExpand Collapse\n\nConversation object { id, created_at, metadata, object } id: stringThe unique ID of the conversation.created_at: numberThe time at which the conversation was created, measured in seconds since the Unix epoch.formatunixtimemetadata: unknownSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\nKeys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.object: \"conversation\"The object type, which is always `conversation`.\n\n### Create a conversation\n\n```\ncurl https://api.openai.com/v1/conversations \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -d '{ \"metadata\": {\"topic\": \"demo\"}, \"items\": [ { \"type\": \"message\", \"role\": \"user\", \"content\": \"Hello!\" } ] }' \n```\n\n```\n{ \"id\": \"conv_123\", \"object\": \"conversation\", \"created_at\": 1741900000, \"metadata\": {\"topic\": \"demo\"} } \n```\n\n##### Returns Examples\n\n```\n{ \"id\": \"conv_123\", \"object\": \"conversation\", \"created_at\": 1741900000, \"metadata\": {\"topic\": \"demo\"} } \n```", "znaku_textu": 111284, "slov": 14735, "odkazu": 1650, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:54:11", "sha256": "e875f0e9420897ed222da6b205ae7e4119b8796b3a6b2ef4fcc5e22e1995cf75", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/ISO_3166-1", "https://timeapi.io/documentation/iana-timezones", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/embeddings", "titulek": "Embeddings | OpenAI API Reference", "h1": "Embeddings", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/embeddings/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Embeddings", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/embeddings/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nCreateEmbeddingResponse object { data, model, object, usage } data: array of [Embedding](/api/reference/resources/embeddings#(resource)%20embeddings%20%3E%20(model)%20embedding%20%3E%20(schema)) { embedding, index, object } The list of embeddings generated by the model.embedding: array of numberThe embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/api/docs/guides/embeddings).index: numberThe index of the embedding in the list of embeddings.object: \"embedding\"The object type, which is always “embedding”.model: stringThe name of the model used to generate the embedding.object: \"list\"The object type, which is always “list”.usage: object { prompt_tokens, total_tokens } The usage information for the request.prompt_tokens: numberThe number of tokens used by the prompt.total_tokens: numberThe total number of tokens used by the request.\n\nEmbedding object { embedding, index, object } Represents an embedding vector returned by embedding endpoint.embedding: array of numberThe embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/api/docs/guides/embeddings).index: numberThe index of the embedding in the list of embeddings.object: \"embedding\"The object type, which is always “embedding”.\n\nEmbeddingModel = \"text-embedding-ada-002\" or \"text-embedding-3-small\" or \"text-embedding-3-large\"One of the following:\"text-embedding-ada-002\"\"text-embedding-3-small\"\"text-embedding-3-large\"", "znaku_textu": 1546, "slov": 200, "odkazu": 386, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:53:50", "sha256": "f260400c7f52b46ff765b47f09ccc310b920ed5b7bb8ec67b91dbe614b5740e2", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/embeddings/create", "titulek": "Create embeddings | OpenAI API Reference", "h1": "Create embeddings", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/embeddings/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create embeddings", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/embeddings/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Embeddings"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create embeddings"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Creates an embedding vector representing the input text.\n\n##### Body ParametersJSONExpand Collapse\n\ninput: string or array of string or array of number or array of array of numberInput 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.One of the following:String = stringThe string that will be turned into an embedding.Array = array of stringThe array of strings that will be turned into an embedding.Array = array of numberThe array of integers that will be turned into an embedding.Array = array of array of numberThe array of arrays containing integers that will be turned into an embedding.\n\nmodel: string or [EmbeddingModel](/api/reference/resources/embeddings#(resource)%20embeddings%20%3E%20(model)%20embedding_model%20%3E%20(schema))ID of the model to use. You can use the [List models](/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](/api/docs/models) for descriptions of them.One of the following:stringEmbeddingModel = \"text-embedding-ada-002\" or \"text-embedding-3-small\" or \"text-embedding-3-large\"One of the following:\"text-embedding-ada-002\"\"text-embedding-3-small\"\"text-embedding-3-large\"\n\ndimensions : optional number\n\nThe number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.\n\nminimum 1\n\nencoding_format: optional \"float\" or \"base64\"The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).One of the following:\"float\"\"base64\"\n\nuser : optional string\n\nA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n\n##### ReturnsExpand Collapse\n\nCreateEmbeddingResponse object { data, model, object, usage } data: array of [Embedding](/api/reference/resources/embeddings#(resource)%20embeddings%20%3E%20(model)%20embedding%20%3E%20(schema)) { embedding, index, object } The list of embeddings generated by the model.embedding: array of numberThe embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/api/docs/guides/embeddings).index: numberThe index of the embedding in the list of embeddings.object: \"embedding\"The object type, which is always “embedding”.model: stringThe name of the model used to generate the embedding.object: \"list\"The object type, which is always “list”.usage: object { prompt_tokens, total_tokens } The usage information for the request.prompt_tokens: numberThe number of tokens used by the prompt.total_tokens: numberThe total number of tokens used by the request.\n\n### Create embeddings\n\n```\ncurl https://api.openai.com/v1/embeddings \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"input\": \"The food was delicious and the waiter...\", \"model\": \"text-embedding-ada-002\", \"encoding_format\": \"float\" }' \n```\n\n```\n{ \"object\": \"list\", \"data\": [ { \"object\": \"embedding\", \"embedding\": [ 0.0023064255, -0.009327292, .... (1536 floats total for ada-002) -0.0028842222, ], \"index\": 0 } ], \"model\": \"text-embedding-ada-002\", \"usage\": { \"prompt_tokens\": 8, \"total_tokens\": 8 } } \n```\n\n##### Returns Examples\n\n```\n{ \"object\": \"list\", \"data\": [ { \"object\": \"embedding\", \"embedding\": [ 0.0023064255, -0.009327292, .... (1536 floats total for ada-002) -0.0028842222, ], \"index\": 0 } ], \"model\": \"text-embedding-ada-002\", \"usage\": { \"prompt_tokens\": 8, \"total_tokens\": 8 } } \n```", "znaku_textu": 4003, "slov": 541, "odkazu": 402, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:17", "sha256": "d873219d1f53ba2a5157b557f157c520ff411da2cc14065451cd544215269a1d", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken", "https://pypi.org/project/pybase64/"]} {"url": "https://developers.openai.com/api/docs/api-reference/evals", "titulek": "Evals | OpenAI API Reference", "h1": "Evals", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/evals/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Evals", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/evals/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["path", "string"], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nEvalCreateResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria.\nAn Eval represents a task to be done for your LLM integration.\nLike: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"custom\"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\nThe schema returned by this data source config is used to defined what variables are available in your evals.\n`item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"logs\"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.name: stringThe name of the evaluation.object: \"eval\"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score.\n\nEvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"custom\"The type of data source. Always `custom`.\n\nEvalDeleteResponse object { deleted, eval_id, object } deleted: booleaneval_id: stringobject: string\n\nEvalListResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria.\nAn Eval represents a task to be done for your LLM integration.\nLike: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"custom\"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\nThe schema returned by this data source config is used to defined what variables are available in your evals.\n`item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"logs\"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.name: stringThe name of the evaluation.object: \"eval\"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score.\n\nEvalRetrieveResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria.\nAn Eval represents a task to be done for your LLM integration.\nLike: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"custom\"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\nThe schema returned by this data source config is used to defined what variables are available in your evals.\n`item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"logs\"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.name: stringThe name of the evaluation.object: \"eval\"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score.\n\nEvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n\nEvalUpdateResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria.\nAn Eval represents a task to be done for your LLM integration.\nLike: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"custom\"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\nThe schema returned by this data source config is used to defined what variables are available in your evals.\n`item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"logs\"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.name: stringThe name of the evaluation.object: \"eval\"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score.\n\n##### ModelsExpand Collapse\n\nCreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more } A CompletionsRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 3 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: \"stored_completions\"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: \"completions\"The type of run data source. Always `completions`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } 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.content: string or [ResponseInputMessageContentList](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_message_content_list%20%3E%20(schema)) { , , } Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.One of the following:TextInput = stringA text input to the model.ResponseInputMessageContentList = array of [ResponseInputContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_content%20%3E%20(schema))A list of one or many input items to the model, containing different content\ntypes.One of the following:ResponseInputText ResponseInputImage ResponseInputFile role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"phase: optional \"commentary\" or \"final_answer\" or nullLabels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).\nFor models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend\nphase on all assistant messages — dropping it can degrade performance. Not used for user messages.One of the following:\"commentary\"\"final_answer\"type: optional \"message\"The type of the message input. Always `message`.EvalMessageObject object { content, role, type } 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.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.GraderInputs = array of string or or object or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An object specifying the format that the model must output. Setting 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](/api/docs/guides/structured-outputs). Setting 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.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: \"text\"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/api/docs/guides/structured-outputs).json_schema: object { name, description, schema, strict } Structured Outputs configuration options, including a JSON Schema.name: stringThe name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.description: optional stringA description of what the response format is for, used by the model to\ndetermine how to respond in the format.schema: optional map[unknown]The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).strict: optional boolean or nullWhether 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](/api/docs/guides/structured-outputs).type: \"json_schema\"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } 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.type: \"json_object\"The type of response format being defined. Always `json_object`.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.tools: optional array of [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n\nCreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.type: \"jsonl\"The type of data source. Always `jsonl`.\n\nEvalAPIError object { code, message } An object representing an error response from the Eval API.code: stringThe error code.message: stringThe error message.\n\nRunCancelResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.type: \"jsonl\"The type of data source. Always `jsonl`.CreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more } A CompletionsRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 3 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: \"stored_completions\"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: \"completions\"The type of run data source. Always `completions`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } 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.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An object specifying the format that the model must output. Setting 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](/api/docs/guides/structured-outputs). Setting 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.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: \"text\"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/api/docs/guides/structured-outputs).json_schema: object { name, description, schema, strict } Structured Outputs configuration options, including a JSON Schema.name: stringThe name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.description: optional stringA description of what the response format is for, used by the model to\ndetermine how to respond in the format.schema: optional map[unknown]The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).strict: optional or 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](/api/docs/guides/structured-outputs).type: \"json_schema\"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } 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.type: \"json_object\"The type of response format being defined. Always `json_object`.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.tools: optional array of [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.ResponsesRunDataSource object { source, type, input_messages, 2 more } A ResponsesRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 8 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.EvalResponsesSource object { type, created_after, created_before, 8 more } A EvalResponsesSource object describing a run data source configuration.type: \"responses\"The type of run data source. Always `responses`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: \"responses\"The type of run data source. Always `responses`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:InputMessagesTemplate object { template, type } template: array of object { content, role } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:ChatMessage object { content, role } content: stringThe content of the message.role: stringThe role of the message (e.g. “system”, “assistant”, “user”).EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.text: optional object { format } Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An object specifying the format that the model must output. Configuring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](/api/docs/guides/structured-outputs). The default format is `{ \"type\": \"text\" }` with no additional options. **Not recommended for gpt-4o and newer models:** Setting 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.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter. The two categories of tools you can provide the model are: **Built-in tools**: Tools that are provided by OpenAI that extend the\nmodel’s capabilities, like [web search](/api/docs/guides/tools-web-search)\nor [file search](/api/docs/guides/tools-file-search). Learn more about\n[built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you,\nenabling the model to call your own code. Learn more about\n[function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: \"function\"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this function.FileSearch object { type, vector_store_ids, filters, 2 more } A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).type: \"file_search\"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.ranking_options: optional object { hybrid_search, ranker, score_threshold } Ranking options for search.: optional : optional One of the following:score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.Computer object { type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).type: \"computer\"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).display_height: numberThe height of the computer display.display_width: numberThe width of the computer display.environment: \"windows\" or \"mac\" or \"linux\" or 2 moreThe type of computer environment to control.One of the following:\"windows\"\"mac\"\"linux\"\"ubuntu\"\"browser\"type: \"computer_use_preview\"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/api/docs/guides/tools-web-search).type: \"web_search\" or \"web_search_2025_08_26\"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:\"web_search\"\"web_search_2025_08_26\"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well. Example: `[\"pubmed.ncbi.nlm.nih.gov\"]`search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: \"code_interpreter\"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"ProgrammaticToolCalling object { type } type: \"programmatic_tool_calling\"The type of the tool. Always `programmatic_tool_calling`.ImageGeneration object { type, action, background, 9 more } A tool that generates images using the GPT image models.type: \"image_generation\"The type of the image generation tool. Always `image_generation`.action: optional \"generate\" or \"edit\" or \"auto\"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:\"generate\"\"edit\"\"auto\"background: optional \"transparent\" or \"opaque\" or \"auto\"Set the background of the generated image. One of `transparent`, `opaque`,\nor `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including\ntheir `2026-09-08` snapshots, support `opaque` and `transparent`\nbackgrounds. Transparent backgrounds are available for supported GPT Image\nmodels. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in\npreview. When using `transparent`, set the output format to `png` or `webp`.\nDefault: `auto`.One of the following:\"transparent\"\"opaque\"\"auto\"input_fidelity: optional or nullControl how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:\"high\"\"low\"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:stringOne of the following:moderation: optional \"auto\" or \"low\"Moderation level for the generated image. Default: `auto`.One of the following:\"auto\"\"low\"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.One of the following:\"png\"\"webp\"\"jpeg\"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional \"low\" or \"medium\" or \"high\" or 3 moreThe quality of the generated image. The GPT image models support `low`,\n`medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,\nincluding their `2026-09-08` snapshots, also support `xhigh` and `max`.\nDefault: `auto`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following:LocalShell object { type } A tool that allows the model to execute shell commands in a local environment.type: \"local_shell\"The type of the local shell tool. Always `local_shell`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: \"shell\"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.Namespace object { description, name, tools, type } Groups function/custom tools under a shared namespace.description: stringA description of the namespace shown to the model.name: stringThe namespace name used in tool calls (for example, `crm`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: \"namespace\"The type of the tool. Always `namespace`.ToolSearch object { type, description, execution, parameters } Hosted or BYOT tool search configuration for deferred tools.type: \"tool_search\"The type of the tool. Always `tool_search`.description: optional string or nullDescription shown to the model for a client-executed tool search tool.execution: optional \"server\" or \"client\"Whether tool search is executed by the server or by the client.One of the following:\"server\"\"client\"parameters: optional unknown or nullParameter schema for a client-executed tool search tool.WebSearchPreview object { type, search_content_types, search_context_size, user_location } This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: \"web_search_preview\" or \"web_search_preview_2025_03_11\"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:\"web_search_preview\"\"web_search_preview_2025_03_11\"search_content_types: optional array of \"text\" or \"image\"One of the following:\"text\"\"image\"search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: \"apply_patch\"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: stringThe model that is evaluated, if applicable.name: stringThe name of the evaluation run.object: \"eval.run\"The type of the object. Always “eval.run”.per_model_usage: array of object { cached_tokens, completion_tokens, invocation_count, 3 more } Usage statistics for each model during the evaluation run.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.invocation_count: numberThe number of invocations.model_name: stringThe name of the model.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.per_testing_criteria_results: array of object { failed, passed, testing_criteria } Results per testing criteria applied during the evaluation run.failed: numberNumber of tests failed for this criteria.passed: numberNumber of tests passed for this criteria.testing_criteria: stringA description of the testing criteria.report_url: stringThe URL to the rendered evaluation run report on the UI dashboard.formaturiresult_counts: object { errored, failed, passed, total } Counters summarizing the outcomes of the evaluation run.errored: numberNumber of output items that resulted in an error.failed: numberNumber of output items that failed to pass the evaluation.passed: numberNumber of output items that passed the evaluation.total: numberTotal number of executed output items.status: stringThe status of the evaluation run.\n\nRunCreateResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.type: \"jsonl\"The type of data source. Always `jsonl`.CreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more } A CompletionsRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 3 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: \"stored_completions\"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: \"completions\"The type of run data source. Always `completions`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } 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.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An object specifying the format that the model must output. Setting 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](/api/docs/guides/structured-outputs). Setting 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.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: \"text\"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/api/docs/guides/structured-outputs).json_schema: object { name, description, schema, strict } Structured Outputs configuration options, including a JSON Schema.name: stringThe name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.description: optional stringA description of what the response format is for, used by the model to\ndetermine how to respond in the format.schema: optional map[unknown]The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).strict: optional or 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](/api/docs/guides/structured-outputs).type: \"json_schema\"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } 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.type: \"json_object\"The type of response format being defined. Always `json_object`.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.tools: optional array of [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.ResponsesRunDataSource object { source, type, input_messages, 2 more } A ResponsesRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 8 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.EvalResponsesSource object { type, created_after, created_before, 8 more } A EvalResponsesSource object describing a run data source configuration.type: \"responses\"The type of run data source. Always `responses`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: \"responses\"The type of run data source. Always `responses`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:InputMessagesTemplate object { template, type } template: array of object { content, role } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:ChatMessage object { content, role } content: stringThe content of the message.role: stringThe role of the message (e.g. “system”, “assistant”, “user”).EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.text: optional object { format } Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An object specifying the format that the model must output. Configuring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](/api/docs/guides/structured-outputs). The default format is `{ \"type\": \"text\" }` with no additional options. **Not recommended for gpt-4o and newer models:** Setting 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.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter. The two categories of tools you can provide the model are: **Built-in tools**: Tools that are provided by OpenAI that extend the\nmodel’s capabilities, like [web search](/api/docs/guides/tools-web-search)\nor [file search](/api/docs/guides/tools-file-search). Learn more about\n[built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you,\nenabling the model to call your own code. Learn more about\n[function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: \"function\"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this function.FileSearch object { type, vector_store_ids, filters, 2 more } A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).type: \"file_search\"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.ranking_options: optional object { hybrid_search, ranker, score_threshold } Ranking options for search.: optional : optional One of the following:score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.Computer object { type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).type: \"computer\"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).display_height: numberThe height of the computer display.display_width: numberThe width of the computer display.environment: \"windows\" or \"mac\" or \"linux\" or 2 moreThe type of computer environment to control.One of the following:\"windows\"\"mac\"\"linux\"\"ubuntu\"\"browser\"type: \"computer_use_preview\"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/api/docs/guides/tools-web-search).type: \"web_search\" or \"web_search_2025_08_26\"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:\"web_search\"\"web_search_2025_08_26\"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well. Example: `[\"pubmed.ncbi.nlm.nih.gov\"]`search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: \"code_interpreter\"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"ProgrammaticToolCalling object { type } type: \"programmatic_tool_calling\"The type of the tool. Always `programmatic_tool_calling`.ImageGeneration object { type, action, background, 9 more } A tool that generates images using the GPT image models.type: \"image_generation\"The type of the image generation tool. Always `image_generation`.action: optional \"generate\" or \"edit\" or \"auto\"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:\"generate\"\"edit\"\"auto\"background: optional \"transparent\" or \"opaque\" or \"auto\"Set the background of the generated image. One of `transparent`, `opaque`,\nor `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including\ntheir `2026-09-08` snapshots, support `opaque` and `transparent`\nbackgrounds. Transparent backgrounds are available for supported GPT Image\nmodels. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in\npreview. When using `transparent`, set the output format to `png` or `webp`.\nDefault: `auto`.One of the following:\"transparent\"\"opaque\"\"auto\"input_fidelity: optional or nullControl how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:\"high\"\"low\"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:stringOne of the following:moderation: optional \"auto\" or \"low\"Moderation level for the generated image. Default: `auto`.One of the following:\"auto\"\"low\"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.One of the following:\"png\"\"webp\"\"jpeg\"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional \"low\" or \"medium\" or \"high\" or 3 moreThe quality of the generated image. The GPT image models support `low`,\n`medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,\nincluding their `2026-09-08` snapshots, also support `xhigh` and `max`.\nDefault: `auto`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following:LocalShell object { type } A tool that allows the model to execute shell commands in a local environment.type: \"local_shell\"The type of the local shell tool. Always `local_shell`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: \"shell\"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.Namespace object { description, name, tools, type } Groups function/custom tools under a shared namespace.description: stringA description of the namespace shown to the model.name: stringThe namespace name used in tool calls (for example, `crm`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: \"namespace\"The type of the tool. Always `namespace`.ToolSearch object { type, description, execution, parameters } Hosted or BYOT tool search configuration for deferred tools.type: \"tool_search\"The type of the tool. Always `tool_search`.description: optional string or nullDescription shown to the model for a client-executed tool search tool.execution: optional \"server\" or \"client\"Whether tool search is executed by the server or by the client.One of the following:\"server\"\"client\"parameters: optional unknown or nullParameter schema for a client-executed tool search tool.WebSearchPreview object { type, search_content_types, search_context_size, user_location } This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: \"web_search_preview\" or \"web_search_preview_2025_03_11\"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:\"web_search_preview\"\"web_search_preview_2025_03_11\"search_content_types: optional array of \"text\" or \"image\"One of the following:\"text\"\"image\"search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: \"apply_patch\"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: stringThe model that is evaluated, if applicable.name: stringThe name of the evaluation run.object: \"eval.run\"The type of the object. Always “eval.run”.per_model_usage: array of object { cached_tokens, completion_tokens, invocation_count, 3 more } Usage statistics for each model during the evaluation run.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.invocation_count: numberThe number of invocations.model_name: stringThe name of the model.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.per_testing_criteria_results: array of object { failed, passed, testing_criteria } Results per testing criteria applied during the evaluation run.failed: numberNumber of tests failed for this criteria.passed: numberNumber of tests passed for this criteria.testing_criteria: stringA description of the testing criteria.report_url: stringThe URL to the rendered evaluation run report on the UI dashboard.formaturiresult_counts: object { errored, failed, passed, total } Counters summarizing the outcomes of the evaluation run.errored: numberNumber of output items that resulted in an error.failed: numberNumber of output items that failed to pass the evaluation.passed: numberNumber of output items that passed the evaluation.total: numberTotal number of executed output items.status: stringThe status of the evaluation run.\n\nRunDeleteResponse object { deleted, object, run_id } deleted: optional booleanobject: optional stringrun_id: optional string\n\nRunListResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.type: \"jsonl\"The type of data source. Always `jsonl`.CreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more } A CompletionsRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 3 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: \"stored_completions\"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: \"completions\"The type of run data source. Always `completions`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } 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.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An object specifying the format that the model must output. Setting 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](/api/docs/guides/structured-outputs). Setting 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.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: \"text\"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/api/docs/guides/structured-outputs).json_schema: object { name, description, schema, strict } Structured Outputs configuration options, including a JSON Schema.name: stringThe name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.description: optional stringA description of what the response format is for, used by the model to\ndetermine how to respond in the format.schema: optional map[unknown]The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).strict: optional or 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](/api/docs/guides/structured-outputs).type: \"json_schema\"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } 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.type: \"json_object\"The type of response format being defined. Always `json_object`.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.tools: optional array of [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.ResponsesRunDataSource object { source, type, input_messages, 2 more } A ResponsesRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 8 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.EvalResponsesSource object { type, created_after, created_before, 8 more } A EvalResponsesSource object describing a run data source configuration.type: \"responses\"The type of run data source. Always `responses`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: \"responses\"The type of run data source. Always `responses`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:InputMessagesTemplate object { template, type } template: array of object { content, role } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:ChatMessage object { content, role } content: stringThe content of the message.role: stringThe role of the message (e.g. “system”, “assistant”, “user”).EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.text: optional object { format } Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An object specifying the format that the model must output. Configuring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](/api/docs/guides/structured-outputs). The default format is `{ \"type\": \"text\" }` with no additional options. **Not recommended for gpt-4o and newer models:** Setting 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.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter. The two categories of tools you can provide the model are: **Built-in tools**: Tools that are provided by OpenAI that extend the\nmodel’s capabilities, like [web search](/api/docs/guides/tools-web-search)\nor [file search](/api/docs/guides/tools-file-search). Learn more about\n[built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you,\nenabling the model to call your own code. Learn more about\n[function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: \"function\"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this function.FileSearch object { type, vector_store_ids, filters, 2 more } A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).type: \"file_search\"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.ranking_options: optional object { hybrid_search, ranker, score_threshold } Ranking options for search.: optional : optional One of the following:score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.Computer object { type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).type: \"computer\"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).display_height: numberThe height of the computer display.display_width: numberThe width of the computer display.environment: \"windows\" or \"mac\" or \"linux\" or 2 moreThe type of computer environment to control.One of the following:\"windows\"\"mac\"\"linux\"\"ubuntu\"\"browser\"type: \"computer_use_preview\"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/api/docs/guides/tools-web-search).type: \"web_search\" or \"web_search_2025_08_26\"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:\"web_search\"\"web_search_2025_08_26\"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well. Example: `[\"pubmed.ncbi.nlm.nih.gov\"]`search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: \"code_interpreter\"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"ProgrammaticToolCalling object { type } type: \"programmatic_tool_calling\"The type of the tool. Always `programmatic_tool_calling`.ImageGeneration object { type, action, background, 9 more } A tool that generates images using the GPT image models.type: \"image_generation\"The type of the image generation tool. Always `image_generation`.action: optional \"generate\" or \"edit\" or \"auto\"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:\"generate\"\"edit\"\"auto\"background: optional \"transparent\" or \"opaque\" or \"auto\"Set the background of the generated image. One of `transparent`, `opaque`,\nor `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including\ntheir `2026-09-08` snapshots, support `opaque` and `transparent`\nbackgrounds. Transparent backgrounds are available for supported GPT Image\nmodels. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in\npreview. When using `transparent`, set the output format to `png` or `webp`.\nDefault: `auto`.One of the following:\"transparent\"\"opaque\"\"auto\"input_fidelity: optional or nullControl how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:\"high\"\"low\"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:stringOne of the following:moderation: optional \"auto\" or \"low\"Moderation level for the generated image. Default: `auto`.One of the following:\"auto\"\"low\"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.One of the following:\"png\"\"webp\"\"jpeg\"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional \"low\" or \"medium\" or \"high\" or 3 moreThe quality of the generated image. The GPT image models support `low`,\n`medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,\nincluding their `2026-09-08` snapshots, also support `xhigh` and `max`.\nDefault: `auto`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following:LocalShell object { type } A tool that allows the model to execute shell commands in a local environment.type: \"local_shell\"The type of the local shell tool. Always `local_shell`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: \"shell\"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.Namespace object { description, name, tools, type } Groups function/custom tools under a shared namespace.description: stringA description of the namespace shown to the model.name: stringThe namespace name used in tool calls (for example, `crm`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: \"namespace\"The type of the tool. Always `namespace`.ToolSearch object { type, description, execution, parameters } Hosted or BYOT tool search configuration for deferred tools.type: \"tool_search\"The type of the tool. Always `tool_search`.description: optional string or nullDescription shown to the model for a client-executed tool search tool.execution: optional \"server\" or \"client\"Whether tool search is executed by the server or by the client.One of the following:\"server\"\"client\"parameters: optional unknown or nullParameter schema for a client-executed tool search tool.WebSearchPreview object { type, search_content_types, search_context_size, user_location } This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: \"web_search_preview\" or \"web_search_preview_2025_03_11\"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:\"web_search_preview\"\"web_search_preview_2025_03_11\"search_content_types: optional array of \"text\" or \"image\"One of the following:\"text\"\"image\"search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: \"apply_patch\"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: stringThe model that is evaluated, if applicable.name: stringThe name of the evaluation run.object: \"eval.run\"The type of the object. Always “eval.run”.per_model_usage: array of object { cached_tokens, completion_tokens, invocation_count, 3 more } Usage statistics for each model during the evaluation run.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.invocation_count: numberThe number of invocations.model_name: stringThe name of the model.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.per_testing_criteria_results: array of object { failed, passed, testing_criteria } Results per testing criteria applied during the evaluation run.failed: numberNumber of tests failed for this criteria.passed: numberNumber of tests passed for this criteria.testing_criteria: stringA description of the testing criteria.report_url: stringThe URL to the rendered evaluation run report on the UI dashboard.formaturiresult_counts: object { errored, failed, passed, total } Counters summarizing the outcomes of the evaluation run.errored: numberNumber of output items that resulted in an error.failed: numberNumber of output items that failed to pass the evaluation.passed: numberNumber of output items that passed the evaluation.total: numberTotal number of executed output items.status: stringThe status of the evaluation run.\n\nRunRetrieveResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.type: \"jsonl\"The type of data source. Always `jsonl`.CreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more } A CompletionsRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 3 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: \"stored_completions\"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: optional string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: \"completions\"The type of run data source. Always `completions`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } 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.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An object specifying the format that the model must output. Setting 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](/api/docs/guides/structured-outputs). Setting 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.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: \"text\"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/api/docs/guides/structured-outputs).json_schema: object { name, description, schema, strict } Structured Outputs configuration options, including a JSON Schema.name: stringThe name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.description: optional stringA description of what the response format is for, used by the model to\ndetermine how to respond in the format.schema: optional map[unknown]The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).strict: optional or 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](/api/docs/guides/structured-outputs).type: \"json_schema\"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } 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.type: \"json_object\"The type of response format being defined. Always `json_object`.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.tools: optional array of [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.function: [FunctionDefinition](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: \"function\"The type of the tool. Currently, only `function` is supported.top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.ResponsesRunDataSource object { source, type, input_messages, 2 more } A ResponsesRunDataSource object describing a model sampling configuration.source: object { content, type } or object { id, type } or object { type, created_after, created_before, 8 more } Determines what populates the `item` namespace in this run’s data source.One of the following:EvalJSONLFileContentSource object { content, type } content: array of object { item, sample } The content of the jsonl file.item: map[unknown]sample: optional map[unknown]type: \"file_content\"The type of jsonl source. Always `file_content`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: \"file_id\"The type of jsonl source. Always `file_id`.EvalResponsesSource object { type, created_after, created_before, 8 more } A EvalResponsesSource object describing a run data source configuration.type: \"responses\"The type of run data source. Always `responses`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: \"responses\"The type of run data source. Always `responses`.input_messages: optional object { template, type } or object { item_reference, type } Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.One of the following:InputMessagesTemplate object { template, type } template: array of object { content, role } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:ChatMessage object { content, role } content: stringThe content of the message.role: stringThe role of the message (e.g. “system”, “assistant”, “user”).EvalMessageObject object { content, role, type } 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.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: \"template\"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: \"item_reference\"The type of input messages. Always `item_reference`.model: optional stringThe name of the model to use for generating completions (e.g. “o3-mini”).sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more } max_completion_tokens: optional numberThe maximum number of tokens in the generated output.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional numberA seed value to initialize the randomness, during sampling.temperature: optional numberA higher temperature increases randomness in the outputs.text: optional object { format } Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An object specifying the format that the model must output. Configuring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](/api/docs/guides/structured-outputs). The default format is `{ \"type\": \"text\" }` with no additional options. **Not recommended for gpt-4o and newer models:** Setting 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.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter. The two categories of tools you can provide the model are: **Built-in tools**: Tools that are provided by OpenAI that extend the\nmodel’s capabilities, like [web search](/api/docs/guides/tools-web-search)\nor [file search](/api/docs/guides/tools-file-search). Learn more about\n[built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you,\nenabling the model to call your own code. Learn more about\n[function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: \"function\"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this function.FileSearch object { type, vector_store_ids, filters, 2 more } A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).type: \"file_search\"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.ranking_options: optional object { hybrid_search, ranker, score_threshold } Ranking options for search.: optional : optional One of the following:score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.Computer object { type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).type: \"computer\"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).display_height: numberThe height of the computer display.display_width: numberThe width of the computer display.environment: \"windows\" or \"mac\" or \"linux\" or 2 moreThe type of computer environment to control.One of the following:\"windows\"\"mac\"\"linux\"\"ubuntu\"\"browser\"type: \"computer_use_preview\"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/api/docs/guides/tools-web-search).type: \"web_search\" or \"web_search_2025_08_26\"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:\"web_search\"\"web_search_2025_08_26\"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well. Example: `[\"pubmed.ncbi.nlm.nih.gov\"]`search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: \"code_interpreter\"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"ProgrammaticToolCalling object { type } type: \"programmatic_tool_calling\"The type of the tool. Always `programmatic_tool_calling`.ImageGeneration object { type, action, background, 9 more } A tool that generates images using the GPT image models.type: \"image_generation\"The type of the image generation tool. Always `image_generation`.action: optional \"generate\" or \"edit\" or \"auto\"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:\"generate\"\"edit\"\"auto\"background: optional \"transparent\" or \"opaque\" or \"auto\"Set the background of the generated image. One of `transparent`, `opaque`,\nor `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including\ntheir `2026-09-08` snapshots, support `opaque` and `transparent`\nbackgrounds. Transparent backgrounds are available for supported GPT Image\nmodels. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in\npreview. When using `transparent`, set the output format to `png` or `webp`.\nDefault: `auto`.One of the following:\"transparent\"\"opaque\"\"auto\"input_fidelity: optional or nullControl how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:\"high\"\"low\"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.One of the following:stringOne of the following:moderation: optional \"auto\" or \"low\"Moderation level for the generated image. Default: `auto`.One of the following:\"auto\"\"low\"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.One of the following:\"png\"\"webp\"\"jpeg\"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional \"low\" or \"medium\" or \"high\" or 3 moreThe quality of the generated image. The GPT image models support `low`,\n`medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,\nincluding their `2026-09-08` snapshots, also support `xhigh` and `max`.\nDefault: `auto`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following:LocalShell object { type } A tool that allows the model to execute shell commands in a local environment.type: \"local_shell\"The type of the local shell tool. Always `local_shell`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: \"shell\"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)name: stringThe name of the custom tool, used to identify it in tool calls.type: \"custom\"The type of the custom tool. Always `custom`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.description: optional stringOptional description of the custom tool, used to provide more context.format: optional [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.Namespace object { description, name, tools, type } Groups function/custom tools under a shared namespace.description: stringA description of the namespace shown to the model.name: stringThe namespace name used in tool calls (for example, `crm`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: \"namespace\"The type of the tool. Always `namespace`.ToolSearch object { type, description, execution, parameters } Hosted or BYOT tool search configuration for deferred tools.type: \"tool_search\"The type of the tool. Always `tool_search`.description: optional string or nullDescription shown to the model for a client-executed tool search tool.execution: optional \"server\" or \"client\"Whether tool search is executed by the server or by the client.One of the following:\"server\"\"client\"parameters: optional unknown or nullParameter schema for a client-executed tool search tool.WebSearchPreview object { type, search_content_types, search_context_size, user_location } This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: \"web_search_preview\" or \"web_search_preview_2025_03_11\"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:\"web_search_preview\"\"web_search_preview_2025_03_11\"search_content_types: optional array of \"text\" or \"image\"One of the following:\"text\"\"image\"search_context_size: optional \"low\" or \"medium\" or \"high\"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.One of the following:\"low\"\"medium\"\"high\"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: \"apply_patch\"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.model: stringThe model that is evaluated, if applicable.name: stringThe name of the evaluation run.object: \"eval.run\"The type of the object. Always “eval.run”.per_model_usage: array of object { cached_tokens, completion_tokens, invocation_count, 3 more } Usage statistics for each model during the evaluation run.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.invocation_count: numberThe number of invocations.model_name: stringThe name of the model.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.per_testing_criteria_results: array of object { failed, passed, testing_criteria } Results per testing criteria applied during the evaluation run.failed: numberNumber of tests failed for this criteria.passed: numberNumber of tests passed for this criteria.testing_criteria: stringA description of the testing criteria.report_url: stringThe URL to the rendered evaluation run report on the UI dashboard.formaturiresult_counts: object { errored, failed, passed, total } Counters summarizing the outcomes of the evaluation run.errored: numberNumber of output items that resulted in an error.failed: numberNumber of output items that failed to pass the evaluation.passed: numberNumber of output items that passed the evaluation.total: numberTotal number of executed output items.status: stringThe status of the evaluation run.\n\n##### ModelsExpand Collapse\n\nOutputItemListResponse object { id, created_at, datasource_item, 7 more } A schema representing an evaluation run output item.id: stringUnique identifier for the evaluation run output item.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedatasource_item: map[unknown]Details of the input data source item.datasource_item_id: numberThe identifier for the data source item.eval_id: stringThe identifier of the evaluation group.object: \"eval.run.output_item\"The type of the object. Always “eval.run.output_item”.results: array of object { name, passed, score, 2 more } A list of grader results for this output item.name: stringThe name of the grader.passed: booleanWhether the grader considered the output a pass.score: numberThe numeric score produced by the grader.sample: optional map[unknown] or nullOptional sample or intermediate data produced by the grader.type: optional stringThe grader type (for example, “string-check-grader”).run_id: stringThe identifier of the evaluation run associated with this output item.sample: object { error, finish_reason, input, 7 more } A sample containing the input and output of the evaluation run.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.finish_reason: stringThe reason why the sample generation was finished.input: array of object { content, role } An array of input messages.content: stringThe content of the message.role: stringThe role of the message sender (e.g., system, user, developer).max_completion_tokens: numberThe maximum number of tokens allowed for completion.model: stringThe model used for generating the sample.output: array of object { content, role } An array of output messages.content: optional stringThe content of the message.role: optional stringThe role of the message (e.g. “system”, “assistant”, “user”).seed: numberThe seed used for generating the sample.temperature: numberThe sampling temperature used.top_p: numberThe top_p value used for sampling.usage: object { cached_tokens, completion_tokens, prompt_tokens, total_tokens } Token usage details for the sample.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.status: stringThe status of the evaluation run.\n\nOutputItemRetrieveResponse object { id, created_at, datasource_item, 7 more } A schema representing an evaluation run output item.id: stringUnique identifier for the evaluation run output item.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedatasource_item: map[unknown]Details of the input data source item.datasource_item_id: numberThe identifier for the data source item.eval_id: stringThe identifier of the evaluation group.object: \"eval.run.output_item\"The type of the object. Always “eval.run.output_item”.results: array of object { name, passed, score, 2 more } A list of grader results for this output item.name: stringThe name of the grader.passed: booleanWhether the grader considered the output a pass.score: numberThe numeric score produced by the grader.sample: optional map[unknown] or nullOptional sample or intermediate data produced by the grader.type: optional stringThe grader type (for example, “string-check-grader”).run_id: stringThe identifier of the evaluation run associated with this output item.sample: object { error, finish_reason, input, 7 more } A sample containing the input and output of the evaluation run.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.finish_reason: stringThe reason why the sample generation was finished.input: array of object { content, role } An array of input messages.content: stringThe content of the message.role: stringThe role of the message sender (e.g., system, user, developer).max_completion_tokens: numberThe maximum number of tokens allowed for completion.model: stringThe model used for generating the sample.output: array of object { content, role } An array of output messages.content: optional stringThe content of the message.role: optional stringThe role of the message (e.g. “system”, “assistant”, “user”).seed: numberThe seed used for generating the sample.temperature: numberThe sampling temperature used.top_p: numberThe top_p value used for sampling.usage: object { cached_tokens, completion_tokens, prompt_tokens, total_tokens } Token usage details for the sample.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.status: stringThe status of the evaluation run.", "znaku_textu": 195368, "slov": 25187, "odkazu": 2082, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:41:36", "sha256": "442ce96fa6713ca17220230dc7293f84a218884dd38c3b4a9c7546edc3a03d42", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://json-schema.org/", "https://en.wikipedia.org/wiki/ISO_3166-1", "https://timeapi.io/documentation/iana-timezones", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/evals/createRun", "titulek": "Create eval | OpenAI API Reference", "h1": "Create eval", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/evals/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create eval", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/evals/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Evals"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create eval"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Create the structure of an evaluation that can be used to test a model’s performance.\nAn evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\nFor more information, see the [Evals guide](/api/docs/guides/evals).\n\n##### Body ParametersJSONExpand Collapse\n\ndata_source_config: object { item_schema, type, include_sample_schema } or object { type, metadata } or object { type, metadata } The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.One of the following:CustomDataSourceConfig object { item_schema, type, include_sample_schema } A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.\nThis schema is used to define the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run item_schema: map[unknown]The json schema for each row in the data source.type: \"custom\"The type of data source. Always `custom`.include_sample_schema: optional booleanWhether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)LogsDataSourceConfig object { type, metadata } A data source config which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.type: \"logs\"The type of data source. Always `logs`.metadata: optional map[unknown]Metadata filters for the logs data source.StoredCompletionsDataSourceConfig object { type, metadata } Deprecated in favor of LogsDataSourceConfig.type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional map[unknown]Metadata filters for the stored completions data source.\n\ntesting_criteria: array of object { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model’s output, use the `sample` namespace (ie, `{{sample.output_text}}`).One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:SimpleInputMessage object { content, role } content: stringThe content of the message.role: stringThe role of the message (e.g. “system”, “assistant”, “user”).EvalMessageObject object { content, role, type } 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.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to classify to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarity = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.Python = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModel = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score.\n\nmetadata : optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or null\n\nSet 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\nname : optional string\n\nThe name of the evaluation.\n\n##### ReturnsExpand Collapse\n\nid : string\n\nUnique identifier for the evaluation.\n\ncreated_at : number\n\nThe Unix timestamp (in seconds) for when the eval was created.\n\nformat unixtime\n\ndata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"custom\"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\nThe schema returned by this data source config is used to defined what variables are available in your evals.\n`item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"logs\"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n\nmetadata : [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or null\n\nSet 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\nname : string\n\nThe name of the evaluation.\n\nobject : \"eval\"\n\nThe object type.\n\ntesting_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score.\n\n### Create eval\n\n```\ncurl https://api.openai.com/v1/evals \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"name\": \"Sentiment\", \"data_source_config\": { \"type\": \"stored_completions\", \"metadata\": { \"usecase\": \"chatbot\" } }, \"testing_criteria\": [ { \"type\": \"label_model\", \"model\": \"o3-mini\", \"input\": [ { \"role\": \"developer\", \"content\": \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\" }, { \"role\": \"user\", \"content\": \"Statement: {{item.input}}\" } ], \"passing_labels\": [ \"positive\" ], \"labels\": [ \"positive\", \"neutral\", \"negative\" ], \"name\": \"Example label grader\" } ] }' \n```\n\n```\n{ \"object\": \"eval\", \"id\": \"eval_67b7fa9a81a88190ab4aa417e397ea21\", \"data_source_config\": { \"type\": \"stored_completions\", \"metadata\": { \"usecase\": \"chatbot\" }, \"schema\": { \"type\": \"object\", \"properties\": { \"item\": { \"type\": \"object\" }, \"sample\": { \"type\": \"object\" } }, \"required\": [ \"item\", \"sample\" ] }, \"testing_criteria\": [ { \"name\": \"Example label grader\", \"type\": \"label_model\", \"model\": \"o3-mini\", \"input\": [ { \"type\": \"message\", \"role\": \"developer\", \"content\": { \"type\": \"input_text\", \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\" } }, { \"type\": \"message\", \"role\": \"user\", \"content\": { \"type\": \"input_text\", \"text\": \"Statement: {{item.input}}\" } } ], \"passing_labels\": [ \"positive\" ], \"labels\": [ \"positive\", \"neutral\", \"negative\" ] } ], \"name\": \"Sentiment\", \"created_at\": 1740110490, \"metadata\": { \"description\": \"An eval for sentiment analysis\" } } \n```\n\n##### Returns Examples\n\n```\n{ \"object\": \"eval\", \"id\": \"eval_67b7fa9a81a88190ab4aa417e397ea21\", \"data_source_config\": { \"type\": \"stored_completions\", \"metadata\": { \"usecase\": \"chatbot\" }, \"schema\": { \"type\": \"object\", \"properties\": { \"item\": { \"type\": \"object\" }, \"sample\": { \"type\": \"object\" } }, \"required\": [ \"item\", \"sample\" ] }, \"testing_criteria\": [ { \"name\": \"Example label grader\", \"type\": \"label_model\", \"model\": \"o3-mini\", \"input\": [ { \"type\": \"message\", \"role\": \"developer\", \"content\": { \"type\": \"input_text\", \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\" } }, { \"type\": \"message\", \"role\": \"user\", \"content\": { \"type\": \"input_text\", \"text\": \"Statement: {{item.input}}\" } } ], \"passing_labels\": [ \"positive\" ], \"labels\": [ \"positive\", \"neutral\", \"negative\" ] } ], \"name\": \"Sentiment\", \"created_at\": 1740110490, \"metadata\": { \"description\": \"An eval for sentiment analysis\" } } \n```", "znaku_textu": 21586, "slov": 2805, "odkazu": 504, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:41:56", "sha256": "29e55155f5d2e65c67e91e1c09367ad5df7f37f9a487010de6de15e539fd8129", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://json-schema.org/"]} {"url": "https://developers.openai.com/api/docs/api-reference/evals/getRun", "titulek": "Get an eval | OpenAI API Reference", "h1": "Get an eval", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/evals/methods/retrieve/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Get an eval", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/evals/methods/retrieve/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Evals"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Get an eval"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Get an evaluation by ID.\n\n##### Path ParametersExpand Collapse\n\neval_id : string\n\n##### ReturnsExpand Collapse\n\nid : string\n\nUnique identifier for the evaluation.\n\ncreated_at : number\n\nThe Unix timestamp (in seconds) for when the eval was created.\n\nformat unixtime\n\ndata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"custom\"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\nThe schema returned by this data source config is used to defined what variables are available in your evals.\n`item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"logs\"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).type: \"stored_completions\"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n\nmetadata : [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or null\n\nSet 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\nname : string\n\nThe name of the evaluation.\n\nobject : \"eval\"\n\nThe object type.\n\ntesting_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score.\n\n### Get an eval\n\n```\ncurl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \n```\n\n```\n{ \"object\": \"eval\", \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\", \"data_source_config\": { \"type\": \"custom\", \"schema\": { \"type\": \"object\", \"properties\": { \"item\": { \"type\": \"object\", \"properties\": { \"input\": { \"type\": \"string\" }, \"ground_truth\": { \"type\": \"string\" } }, \"required\": [ \"input\", \"ground_truth\" ] } }, \"required\": [ \"item\" ] } }, \"testing_criteria\": [ { \"name\": \"String check\", \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\", \"type\": \"string_check\", \"input\": \"{{item.input}}\", \"reference\": \"{{item.ground_truth}}\", \"operation\": \"eq\" } ], \"name\": \"External Data Eval\", \"created_at\": 1739314509, \"metadata\": {}, } \n```\n\n##### Returns Examples\n\n```\n{ \"object\": \"eval\", \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\", \"data_source_config\": { \"type\": \"custom\", \"schema\": { \"type\": \"object\", \"properties\": { \"item\": { \"type\": \"object\", \"properties\": { \"input\": { \"type\": \"string\" }, \"ground_truth\": { \"type\": \"string\" } }, \"required\": [ \"input\", \"ground_truth\" ] } }, \"required\": [ \"item\" ] } }, \"testing_criteria\": [ { \"name\": \"String check\", \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\", \"type\": \"string_check\", \"input\": \"{{item.input}}\", \"reference\": \"{{item.ground_truth}}\", \"operation\": \"eq\" } ], \"name\": \"External Data Eval\", \"created_at\": 1739314509, \"metadata\": {}, } \n```", "znaku_textu": 11479, "slov": 1441, "odkazu": 458, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:41:59", "sha256": "3dfca7cedc376121d73f0b6aa5ca73ccafb5a50b5850b6217a19e346027e038f", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://json-schema.org/"]} {"url": "https://developers.openai.com/api/docs/api-reference/files", "titulek": "Files | OpenAI API Reference", "h1": "Files", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/files/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Files", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/files/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nFileContent = string\n\nFileDeleted object { id, deleted, object } id: stringdeleted: booleanobject: \"file\"\n\nFileObject object { id, bytes, created_at, 6 more } The `File` object represents a document that has been uploaded to OpenAI.id: stringThe file identifier, which can be referenced in the API endpoints.bytes: numberThe size of the file, in bytes.created_at: numberThe Unix timestamp (in seconds) for when the file was created.formatunixtimefilename: stringThe name of the file.object: \"file\"The object type, which is always `file`.purpose: \"assistants\" or \"assistants_output\" or \"batch\" or 5 moreThe intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.One of the following:\"assistants\"\"assistants_output\"\"batch\"\"batch_output\"\"fine-tune\"\"fine-tune-results\"\"vision\"\"user_data\"Deprecatedstatus: \"uploaded\" or \"processed\" or \"error\"Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.One of the following:\"uploaded\"\"processed\"\"error\"expires_at: optional numberThe Unix timestamp (in seconds) for when the file will expire.formatunixtimeDeprecatedstatus_details: optional stringDeprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", "znaku_textu": 1370, "slov": 178, "odkazu": 395, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:53:52", "sha256": "49941c4ad83954ed197bcc08cb2234334d255baed230606153c403b43f3f9b23", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/files/create", "titulek": "Upload file | OpenAI API Reference", "h1": "Upload file", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/files/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Upload file", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/files/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Files"], "osnova": [{"uroven": 5, "text": "Body ParametersForm DataExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Upload file"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Upload a file that can be used across various endpoints. Individual files\ncan be up to 512 MB, and each project can store up to 2.5 TB of files in\ntotal. There is no organization-wide storage limit. Uploads to this\nendpoint are rate-limited to 1,000 requests per minute per authenticated\nuser.\n\n- The Assistants API supports files up to 2 million tokens and of specific\nfile types. See the [Assistants Tools guide](/api/docs/guides/tools) for\ndetails.\n- The Fine-tuning API only supports `.jsonl` files. The input also has\ncertain required formats for fine-tuning [chat](/api/docs/guides/supervised-fine-tuning#formatting-your-data) or [completions](/api/docs/guides/supervised-fine-tuning#formatting-your-data) models.\n- The Batch API only supports `.jsonl` files up to 200 MB in size. The input\nalso has a specific required [format](/api/docs/guides/batch#1-prepare-your-batch-file) .\n- For Retrieval or `file_search` ingestion, upload files here first. If\nyou need to attach multiple uploaded files to the same vector store, use [`/vector_stores/{vector_store_id}/file_batches`](/api/reference/resources/vector_stores/subresources/file_batches/methods/create) instead of attaching them one by one. Vector store attachment has separate\nlimits from file upload, including 2,000 attached files per minute per\norganization.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these\nstorage limits.\n\n##### Body ParametersForm DataExpand Collapse\n\nfile : file\n\nThe File object (not file name) to be uploaded.\n\npurpose: \"assistants\" or \"batch\" or \"fine-tune\" or 3 moreThe intended purpose of the uploaded file. One of: `assistants`: Used in the Assistants API `batch`: Used in the Batch API `fine-tune`: Used for fine-tuning `vision`: Images used for vision fine-tuning `user_data`: Flexible file type for any purpose `evals`: Used for eval data sets One of the following:\"assistants\"\"batch\"\"fine-tune\"\"vision\"\"user_data\"\"evals\"\n\nexpires_after: optional object { anchor, seconds } The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.anchor: \"created_at\"Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`.seconds: numberThe number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).formatint64minimum3600maximum2592000\n\n##### ReturnsExpand Collapse\n\nFileObject object { id, bytes, created_at, 6 more } The `File` object represents a document that has been uploaded to OpenAI.id: stringThe file identifier, which can be referenced in the API endpoints.bytes: numberThe size of the file, in bytes.created_at: numberThe Unix timestamp (in seconds) for when the file was created.formatunixtimefilename: stringThe name of the file.object: \"file\"The object type, which is always `file`.purpose: \"assistants\" or \"assistants_output\" or \"batch\" or 5 moreThe intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.One of the following:\"assistants\"\"assistants_output\"\"batch\"\"batch_output\"\"fine-tune\"\"fine-tune-results\"\"vision\"\"user_data\"Deprecatedstatus: \"uploaded\" or \"processed\" or \"error\"Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.One of the following:\"uploaded\"\"processed\"\"error\"expires_at: optional numberThe Unix timestamp (in seconds) for when the file will expire.formatunixtimeDeprecatedstatus_details: optional stringDeprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.\n\n### Upload file\n\n```\ncurl https://api.openai.com/v1/files \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -F purpose=\"fine-tune\" \\ -F file=\"@mydata.jsonl\" -F expires_after[anchor]=\"created_at\" -F expires_after[seconds]=2592000 \n```\n\n```\n{ \"id\": \"file-abc123\", \"object\": \"file\", \"bytes\": 120000, \"created_at\": 1677610602, \"expires_at\": 1677614202, \"filename\": \"mydata.jsonl\", \"purpose\": \"fine-tune\", } \n```\n\n##### Returns Examples\n\n```\n{ \"id\": \"file-abc123\", \"object\": \"file\", \"bytes\": 120000, \"created_at\": 1677610602, \"expires_at\": 1677614202, \"filename\": \"mydata.jsonl\", \"purpose\": \"fine-tune\", } \n```", "znaku_textu": 4250, "slov": 568, "odkazu": 405, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:41:55", "sha256": "cee22a9e3c6699220fd15958a81a47ed478dcfab56f89324d7262ecff7e78ffa", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://help.openai.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:31", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/chat-input", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:09", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/create", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:51:57", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/event-object", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:39", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/list-checkpoints", "titulek": "List fine-tuning checkpoints | OpenAI API Reference", "h1": "List fine-tuning checkpoints", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/subresources/jobs/subresources/checkpoints/methods/list/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "List fine-tuning checkpoints", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/subresources/jobs/subresources/checkpoints/methods/list/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Fine Tuning", "Jobs", "Checkpoints"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 5, "text": "Query ParametersExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "List fine-tuning checkpoints"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "List checkpoints for a fine-tuning job.\n\n##### Path ParametersExpand Collapse\n\nfine_tuning_job_id : string\n\n##### Query ParametersExpand Collapse\n\nafter : optional string\n\nIdentifier for the last checkpoint ID from the previous pagination request.\n\nlimit : optional number\n\nNumber of checkpoints to retrieve.\n\n##### ReturnsExpand Collapse\n\ndata: array of [FineTuningJobCheckpoint](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs.checkpoints%20%3E%20(model)%20fine_tuning_job_checkpoint%20%3E%20(schema)) { id, created_at, fine_tuned_model_checkpoint, 4 more } id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\nhas_more : boolean\n\nobject : \"list\"\n\nfirst_id : optional string or null\n\nlast_id : optional string or null\n\n### List fine-tuning checkpoints\n\n```\ncurl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/checkpoints \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \n```\n\n```\n{ \"object\": \"list\", \"data\": [ { \"object\": \"fine_tuning.job.checkpoint\", \"id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\", \"created_at\": 1721764867, \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000\", \"metrics\": { \"full_valid_loss\": 0.134, \"full_valid_mean_token_accuracy\": 0.874 }, \"fine_tuning_job_id\": \"ftjob-abc123\", \"step_number\": 2000 }, { \"object\": \"fine_tuning.job.checkpoint\", \"id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\", \"created_at\": 1721764800, \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000\", \"metrics\": { \"full_valid_loss\": 0.167, \"full_valid_mean_token_accuracy\": 0.781 }, \"fine_tuning_job_id\": \"ftjob-abc123\", \"step_number\": 1000 } ], \"first_id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\", \"last_id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\", \"has_more\": true } \n```\n\n##### Returns Examples\n\n```\n{ \"object\": \"list\", \"data\": [ { \"object\": \"fine_tuning.job.checkpoint\", \"id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\", \"created_at\": 1721764867, \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000\", \"metrics\": { \"full_valid_loss\": 0.134, \"full_valid_mean_token_accuracy\": 0.874 }, \"fine_tuning_job_id\": \"ftjob-abc123\", \"step_number\": 2000 }, { \"object\": \"fine_tuning.job.checkpoint\", \"id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\", \"created_at\": 1721764800, \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000\", \"metrics\": { \"full_valid_loss\": 0.167, \"full_valid_mean_token_accuracy\": 0.781 }, \"fine_tuning_job_id\": \"ftjob-abc123\", \"step_number\": 1000 } ], \"first_id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\", \"last_id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\", \"has_more\": true } \n```", "znaku_textu": 3467, "slov": 331, "odkazu": 395, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:02", "sha256": "15a211d834eb0720cc0f7ccaa1169037906bef1848e79621b0436bb11651155e", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/list-events", "titulek": "List fine-tuning jobs | OpenAI API Reference", "h1": "List fine-tuning jobs", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/subresources/jobs/methods/list/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "List fine-tuning jobs", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/subresources/jobs/methods/list/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Fine Tuning", "Jobs"], "osnova": [], "markdown": "id : string\n\nThe object identifier, which can be referenced in the API endpoints.\n\ncreated_at : number\n\nThe Unix timestamp (in seconds) for when the fine-tuning job was created.\n\nformat unixtime\n\nerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.\n\nfine_tuned_model : string or null\n\nThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.\n\nfinished_at : number or null\n\nThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.\n\nformat unixtime\n\nhyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"number\n\nmodel : string\n\nThe base model that is being fine-tuned.\n\nobject : \"fine_tuning.job\"\n\nThe object type, which is always “fine_tuning.job”.\n\norganization_id : string\n\nThe organization that owns the fine-tuning job.\n\nresult_files : array of string\n\nThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).\n\nseed : number\n\nThe seed used for the fine-tuning job.\n\nstatus: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"\n\ntrained_tokens : number or null\n\nThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.\n\ntraining_file : string\n\nThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).\n\nvalidation_file : string or null\n\nThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).\n\nestimated_finish : optional number or null\n\nThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.\n\nformat unixtime\n\nintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nmetadata : optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or null\n\nSet 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\nmethod: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.GraderInputs = array of string or or object or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.One of the following:\"none\"\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\"max\"seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional or The maximum number of tokens the grader model may generate in its response.minimum1: optional One of the following:seed: optional or A seed value to initialize the randomness, during sampling.temperature: optional or A higher temperature increases randomness in the outputs.top_p: optional or An alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } : One of the following:: One of the following:type: optional The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number", "znaku_textu": 19499, "slov": 2486, "odkazu": 605, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:35", "sha256": "25ca1a1b760a81c43e45b2526c96dee8d72f2c5319b3d461eb23b2baffd518a3", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/object", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:22", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/pause", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:45", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/preference-input", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:54:48", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/reinforcement-input", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:16", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/resume", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:52", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/fine-tuning/retrieve", "titulek": "Fine Tuning | OpenAI API Reference", "h1": "Fine Tuning", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/fine_tuning/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Fine Tuning", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/fine_tuning/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderRunResponse object { metadata, model_grader_token_usage_per_model, reward, sub_rewards } metadata: object { errors, execution_time, name, 4 more } errors: object { formula_parse_error, invalid_variable_error, model_grader_parse_error, 11 more } formula_parse_error: booleaninvalid_variable_error: booleanmodel_grader_parse_error: booleanmodel_grader_refusal_error: booleanmodel_grader_server_error: booleanmodel_grader_server_error_details: string or nullother_error: booleanpython_grader_runtime_error: booleanpython_grader_runtime_error_details: string or nullpython_grader_server_error: booleanpython_grader_server_error_type: string or nullsample_parse_error: booleantruncated_observation_error: booleanunresponsive_reward_error: booleanexecution_time: numbername: stringsampled_model_name: string or nullscores: map[unknown]token_usage: number or nulltype: stringmodel_grader_token_usage_per_model: map[unknown]reward: numbersub_rewards: map[unknown]\n\nGraderValidateResponse object { grader } grader: optional [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\n##### ModelsExpand Collapse\n\nPermissionCreateResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionDeleteResponse object { id, deleted, object } id: stringThe ID of the fine-tuned model checkpoint permission that was deleted.deleted: booleanWhether the fine-tuned model checkpoint permission was successfully deleted.object: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.\n\nPermissionListResponse object { id, created_at, object, project_id } The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.\n\nPermissionRetrieveResponse object { data, has_more, object, 2 more } data: array of object { id, created_at, object, project_id } id: stringThe permission identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the permission was created.formatunixtimeobject: \"checkpoint.permission\"The object type, which is always “checkpoint.permission”.project_id: stringThe project identifier that the permission is for.has_more: booleanobject: \"list\"first_id: optional string or nulllast_id: optional string or null\n\n##### ModelsExpand Collapse\n\nFineTuningJob object { id, created_at, error, 16 more } The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.id: stringThe object identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimeerror: object { code, message, param } or nullFor fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.code: stringA machine-readable error code.message: stringA human-readable error message.param: string or nullThe parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.fine_tuned_model: string or nullThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.finished_at: number or nullThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.formatunixtimehyperparameters: object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.batch_size: optional \"auto\" or number or nullNumber of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.One of the following:\"auto\"numbermodel: stringThe base model that is being fine-tuned.object: \"fine_tuning.job\"The object type, which is always “fine_tuning.job”.organization_id: stringThe organization that owns the fine-tuning job.result_files: array of stringThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/api/reference/resources/files/methods/content).seed: numberThe seed used for the fine-tuning job.status: \"validating_files\" or \"queued\" or \"running\" or 3 moreThe current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.One of the following:\"validating_files\"\"queued\"\"running\"\"succeeded\"\"failed\"\"cancelled\"trained_tokens: number or nullThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.training_file: stringThe file ID used for training. You can retrieve the training data with the [Files API](/api/reference/resources/files/methods/content).validation_file: string or nullThe file ID used for validation. You can retrieve the validation results with the [Files API](/api/reference/resources/files/methods/content).estimated_finish: optional number or nullThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.formatunixtimeintegrations: optional array of [FineTuningJobWandbIntegrationObject](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration_object%20%3E%20(schema)) { type, wandb } or nullA list of integrations to enable for this fine-tuning job.type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.method: optional object { type, dpo, reinforcement, supervised } The method used for fine-tuning.type: \"supervised\" or \"dpo\" or \"reinforcement\"The type of method. Is either `supervised`, `dpo`, or `reinforcement`.One of the following:\"supervised\"\"dpo\"\"reinforcement\"dpo: optional [DpoMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_method%20%3E%20(schema)) { hyperparameters } Configuration for the DPO fine-tuning method.reinforcement: optional [ReinforcementMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_method%20%3E%20(schema)) { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.supervised: optional [SupervisedMethod](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_method%20%3E%20(schema)) { hyperparameters } Configuration for the supervised fine-tuning method.\n\nFineTuningJobEvent object { id, created_at, level, 4 more } Fine-tuning job event objectid: stringThe object identifier.created_at: numberThe Unix timestamp (in seconds) for when the fine-tuning job was created.formatunixtimelevel: \"info\" or \"warn\" or \"error\"The log level of the event.One of the following:\"info\"\"warn\"\"error\"message: stringThe message of the event.object: \"fine_tuning.job.event\"The object type, which is always “fine_tuning.job.event”.data: optional unknownThe data associated with the event.type: optional \"message\" or \"metrics\"The type of event.One of the following:\"message\"\"metrics\"\n\nFineTuningJobWandbIntegration object { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.project: stringThe name of the project that the new run will be created under.entity: optional string or nullThe entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.name: optional string or nullA display name to set for the run. If not set, we will use the Job ID as the name.tags: optional array of stringA list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: “openai/finetune”, “openai/{base-model}”, “openai/{ftjob-abcdef}”.\n\nFineTuningJobWandbIntegrationObject object { type, wandb } type: \"wandb\"The type of the integration being enabled for the fine-tuning jobwandb: [FineTuningJobWandbIntegration](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.jobs%20%3E%20(model)%20fine_tuning_job_wandb_integration%20%3E%20(schema)) { project, entity, name, tags } The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n\n##### ModelsExpand Collapse\n\nFineTuningJobCheckpoint object { id, created_at, fine_tuned_model_checkpoint, 4 more } The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.id: stringThe checkpoint identifier, which can be referenced in the API endpoints.created_at: numberThe Unix timestamp (in seconds) for when the checkpoint was created.formatunixtimefine_tuned_model_checkpoint: stringThe name of the fine-tuned checkpoint model that is created.fine_tuning_job_id: stringThe name of the fine-tuning job that this checkpoint was created from.metrics: object { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more } Metrics at the step number during the fine-tuning job.full_valid_loss: optional numberfull_valid_mean_token_accuracy: optional numberstep: optional numbertrain_loss: optional numbertrain_mean_token_accuracy: optional numbervalid_loss: optional numbervalid_mean_token_accuracy: optional numberobject: \"fine_tuning.job.checkpoint\"The object type, which is always “fine_tuning.job.checkpoint”.step_number: numberThe step number that the checkpoint was created at.\n\n##### ModelsExpand Collapse\n\nDpoHyperparameters object { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberbeta: optional \"auto\" or numberThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nDpoMethod object { hyperparameters } Configuration for the DPO fine-tuning method.hyperparameters: optional [DpoHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20dpo_hyperparameters%20%3E%20(schema)) { batch_size, beta, learning_rate_multiplier, n_epochs } The hyperparameters used for the DPO fine-tuning job.\n\nReinforcementHyperparameters object { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numbercompute_multiplier: optional \"auto\" or numberMultiplier on amount of compute used for exploring search space during training.One of the following:\"auto\"numbereval_interval: optional \"auto\" or numberThe number of training steps between evaluation runs.One of the following:\"auto\"numbereval_samples: optional \"auto\" or numberNumber of evaluation samples to generate per training step.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"numberreasoning_effort: optional \"default\" or \"low\" or \"medium\" or \"high\"Level of reasoning effort.One of the following:\"default\"\"low\"\"medium\"\"high\"\n\nReinforcementMethod object { grader, hyperparameters } Configuration for the reinforcement fine-tuning method.grader: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreThe grader used for the fine-tuning job.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.MultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { } or object { } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio GraderInputs = One of the following:role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.hyperparameters: optional [ReinforcementHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20reinforcement_hyperparameters%20%3E%20(schema)) { batch_size, compute_multiplier, eval_interval, 4 more } The hyperparameters used for the reinforcement fine-tuning job.\n\nSupervisedHyperparameters object { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.batch_size: optional \"auto\" or numberNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.One of the following:\"auto\"numberlearning_rate_multiplier: optional \"auto\" or numberScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.One of the following:\"auto\"numbern_epochs: optional \"auto\" or numberThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.One of the following:\"auto\"number\n\nSupervisedMethod object { hyperparameters } Configuration for the supervised fine-tuning method.hyperparameters: optional [SupervisedHyperparameters](/api/reference/resources/fine_tuning#(resource)%20fine_tuning.methods%20%3E%20(model)%20supervised_hyperparameters%20%3E%20(schema)) { batch_size, learning_rate_multiplier, n_epochs } The hyperparameters used for the fine-tuning job.", "znaku_textu": 42383, "slov": 5264, "odkazu": 679, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/fine-tuning", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:29", "sha256": "661d2b7b0cf04c2f8b0a7768d0c39c20df7d9b3a9066a8a3095172ffd02a51da", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/graders", "titulek": "Graders | OpenAI API Reference", "h1": "Graders", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/graders/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Graders", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/graders/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.\n\nLabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.\n\nMultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\nPythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.\n\nScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n\nStringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.\n\nTextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.", "znaku_textu": 24209, "slov": 3336, "odkazu": 482, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:09", "sha256": "9166ecb20189bd183c8a150fd38665eb93d816074cc80c3c425c4c609180dde9", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/graders/multi", "titulek": "Graders | OpenAI API Reference", "h1": "Graders", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/graders/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Graders", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/graders/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.\n\nLabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.\n\nMultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\nPythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.\n\nScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n\nStringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.\n\nTextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.", "znaku_textu": 24209, "slov": 3336, "odkazu": 482, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/graders", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:37:28", "sha256": "9166ecb20189bd183c8a150fd38665eb93d816074cc80c3c425c4c609180dde9", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/graders/score-model", "titulek": "Graders | OpenAI API Reference", "h1": "Graders", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/graders/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Graders", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/graders/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.\n\nLabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.\n\nMultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\nPythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.\n\nScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n\nStringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.\n\nTextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.", "znaku_textu": 24209, "slov": 3336, "odkazu": 482, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/graders", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:11", "sha256": "9166ecb20189bd183c8a150fd38665eb93d816074cc80c3c425c4c609180dde9", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/graders/string-check", "titulek": "Graders | OpenAI API Reference", "h1": "Graders", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/graders/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Graders", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/graders/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nGraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.\n\nLabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.\n\nMultiGrader object { calculate_output, graders, name, type } A MultiGrader object combines the output of multiple graders to produce a single score.calculate_output: stringA formula to calculate the output based on grader results.graders: [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } or 2 moreA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.One of the following:StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.TextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.PythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.ScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: \"label_model\"The object type, which is always `label_model`.name: stringThe name of the grader.type: \"multi\"The object type, which is always `multi`.\n\nPythonGrader object { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.name: stringThe name of the grader.source: stringThe source code of the python script.type: \"python\"The object type, which is always `python`.image_tag: optional stringThe image tag to use for the python script.\n\nScoreModelGrader object { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.input: array of object { content, role, type } The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: \"output_text\"The type of the output text. Always `output_text`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: \"input_image\"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.format: \"mp3\" or \"wav\"The format of the audio data. Currently supported formats are `mp3` and\n`wav`.One of the following:\"mp3\"\"wav\"type: \"input_audio\"The type of the input item. Always `input_audio`.role: \"user\" or \"assistant\" or \"system\" or \"developer\"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.One of the following:\"user\"\"assistant\"\"system\"\"developer\"type: optional \"message\"The type of the message input. Always `message`.model: stringThe model to use for the evaluation.name: stringThe name of the grader.type: \"score_model\"The object type, which is always `score_model`.range: optional array of numberThe range of the score. Defaults to `[0, 1]`.sampling_params: optional object { max_completions_tokens, reasoning_effort, seed, 2 more } The sampling parameters for the model.max_completions_tokens: optional number or nullThe maximum number of tokens the grader model may generate in its response.minimum1reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](/api/docs/guides/reasoning)\nfor model-specific support.seed: optional number or nullA seed value to initialize the randomness, during sampling.temperature: optional number or nullA higher temperature increases randomness in the outputs.top_p: optional number or nullAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n\nStringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: \"eq\" or \"ne\" or \"like\" or \"ilike\"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:\"eq\"\"ne\"\"like\"\"ilike\"reference: stringThe reference text. This may include template strings.type: \"string_check\"The object type, which is always `string_check`.\n\nTextSimilarityGrader object { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.evaluation_metric: \"cosine\" or \"fuzzy_match\" or \"bleu\" or 8 moreThe evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\nor `rouge_l`.One of the following:\"cosine\"\"fuzzy_match\"\"bleu\"\"gleu\"\"meteor\"\"rouge_1\"\"rouge_2\"\"rouge_3\"\"rouge_4\"\"rouge_5\"\"rouge_l\"input: stringThe text being graded.name: stringThe name of the grader.reference: stringThe text being graded against.type: \"text_similarity\"The type of grader.", "znaku_textu": 24209, "slov": 3336, "odkazu": 482, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/graders", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:25:05", "sha256": "9166ecb20189bd183c8a150fd38665eb93d816074cc80c3c425c4c609180dde9", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/images", "titulek": "Images | OpenAI API Reference", "h1": "Images", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/images/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Images", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/images/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nImage object { b64_json, revised_prompt, url } Represents the content or the URL of an image generated by the OpenAI API.b64_json: optional stringThe base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.revised_prompt: optional stringFor `dall-e-3` only, the revised prompt that was used to generate the image.url: optional stringWhen using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models.formaturi\n\nImageEditCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.b64_json: stringBase64-encoded final edited image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the edited image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.completed\"The type of the event. Always `image_edit.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageEditPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested edited image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.partial_image\"The type of the event. Always `image_edit.partial_image`.\n\nImageEditStreamEvent = [ImageEditPartialImageEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_edit_partial_image_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } or [ImageEditCompletedEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_edit_completed_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.One of the following:ImageEditPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested edited image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.partial_image\"The type of the event. Always `image_edit.partial_image`.ImageEditCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.b64_json: stringBase64-encoded final edited image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the edited image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.completed\"The type of the event. Always `image_edit.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageGenCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.b64_json: stringBase64-encoded image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the generated image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the generated image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the generated image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.completed\"The type of the event. Always `image_generation.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageGenPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.partial_image\"The type of the event. Always `image_generation.partial_image`.\n\nImageGenStreamEvent = [ImageGenPartialImageEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_gen_partial_image_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } or [ImageGenCompletedEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_gen_completed_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.One of the following:ImageGenPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.partial_image\"The type of the event. Always `image_generation.partial_image`.ImageGenCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.b64_json: stringBase64-encoded image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the generated image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the generated image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the generated image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.completed\"The type of the event. Always `image_generation.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageModel = \"gpt-image-1.5\" or \"gpt-image-2\" or \"gpt-image-2-2026-04-21\" or 8 moreOne of the following:\"gpt-image-1.5\"\"gpt-image-2\"\"gpt-image-2-2026-04-21\"\"gpt-image-2.5-sunburst\"\"gpt-image-2.5-sunburst-2026-09-08\"\"gpt-image-2.5-flare\"\"gpt-image-2.5-flare-2026-09-08\"\"dall-e-2\"\"dall-e-3\"\"gpt-image-1\"\"gpt-image-1-mini\"\n\nImagesResponse object { created, background, data, 4 more } The response from the image generation endpoint.created: numberThe Unix timestamp (in seconds) of when the image was created.formatunixtimebackground: optional \"transparent\" or \"opaque\"The background parameter used for the image generation. Either `transparent` or `opaque`.One of the following:\"transparent\"\"opaque\"data: optional array of [Image](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image%20%3E%20(schema)) { b64_json, revised_prompt, url } The list of generated images.b64_json: optional stringThe base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.revised_prompt: optional stringFor `dall-e-3` only, the revised prompt that was used to generate the image.url: optional stringWhen using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models.formaturioutput_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the image generation. Either `png`, `webp`, or `jpeg`.One of the following:\"png\"\"webp\"\"jpeg\"quality: optional \"low\" or \"medium\" or \"high\" or 2 moreThe quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or `max`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"size: optional string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more } For `gpt-image-1` only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of output tokens generated by the model.total_tokens: numberThe total number of tokens (images and text) used for the image generation.output_tokens_details: optional object { image_tokens, text_tokens } The output token details for the image generation.image_tokens: numberThe number of image output tokens generated by the model.text_tokens: numberThe number of text output tokens generated by the model.", "znaku_textu": 16844, "slov": 2034, "odkazu": 544, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:53:50", "sha256": "fe7e4332e03494ebf8607e9e631fb7e63dd6445aa811d77325992645a3649b22", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/images/create", "titulek": "Images | OpenAI API Reference", "h1": "Images", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/images/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Images", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/images/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nImage object { b64_json, revised_prompt, url } Represents the content or the URL of an image generated by the OpenAI API.b64_json: optional stringThe base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.revised_prompt: optional stringFor `dall-e-3` only, the revised prompt that was used to generate the image.url: optional stringWhen using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models.formaturi\n\nImageEditCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.b64_json: stringBase64-encoded final edited image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the edited image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.completed\"The type of the event. Always `image_edit.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageEditPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested edited image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.partial_image\"The type of the event. Always `image_edit.partial_image`.\n\nImageEditStreamEvent = [ImageEditPartialImageEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_edit_partial_image_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } or [ImageEditCompletedEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_edit_completed_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.One of the following:ImageEditPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested edited image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.partial_image\"The type of the event. Always `image_edit.partial_image`.ImageEditCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.b64_json: stringBase64-encoded final edited image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the edited image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.completed\"The type of the event. Always `image_edit.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageGenCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.b64_json: stringBase64-encoded image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the generated image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the generated image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the generated image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.completed\"The type of the event. Always `image_generation.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageGenPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.partial_image\"The type of the event. Always `image_generation.partial_image`.\n\nImageGenStreamEvent = [ImageGenPartialImageEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_gen_partial_image_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } or [ImageGenCompletedEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_gen_completed_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.One of the following:ImageGenPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.partial_image\"The type of the event. Always `image_generation.partial_image`.ImageGenCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.b64_json: stringBase64-encoded image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the generated image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the generated image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the generated image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.completed\"The type of the event. Always `image_generation.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageModel = \"gpt-image-1.5\" or \"gpt-image-2\" or \"gpt-image-2-2026-04-21\" or 8 moreOne of the following:\"gpt-image-1.5\"\"gpt-image-2\"\"gpt-image-2-2026-04-21\"\"gpt-image-2.5-sunburst\"\"gpt-image-2.5-sunburst-2026-09-08\"\"gpt-image-2.5-flare\"\"gpt-image-2.5-flare-2026-09-08\"\"dall-e-2\"\"dall-e-3\"\"gpt-image-1\"\"gpt-image-1-mini\"\n\nImagesResponse object { created, background, data, 4 more } The response from the image generation endpoint.created: numberThe Unix timestamp (in seconds) of when the image was created.formatunixtimebackground: optional \"transparent\" or \"opaque\"The background parameter used for the image generation. Either `transparent` or `opaque`.One of the following:\"transparent\"\"opaque\"data: optional array of [Image](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image%20%3E%20(schema)) { b64_json, revised_prompt, url } The list of generated images.b64_json: optional stringThe base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.revised_prompt: optional stringFor `dall-e-3` only, the revised prompt that was used to generate the image.url: optional stringWhen using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models.formaturioutput_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the image generation. Either `png`, `webp`, or `jpeg`.One of the following:\"png\"\"webp\"\"jpeg\"quality: optional \"low\" or \"medium\" or \"high\" or 2 moreThe quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or `max`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"size: optional string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more } For `gpt-image-1` only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of output tokens generated by the model.total_tokens: numberThe total number of tokens (images and text) used for the image generation.output_tokens_details: optional object { image_tokens, text_tokens } The output token details for the image generation.image_tokens: numberThe number of image output tokens generated by the model.text_tokens: numberThe number of text output tokens generated by the model.", "znaku_textu": 16844, "slov": 2034, "odkazu": 544, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/images", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:16", "sha256": "fe7e4332e03494ebf8607e9e631fb7e63dd6445aa811d77325992645a3649b22", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/images/createEdit", "titulek": "Images | OpenAI API Reference", "h1": "Images", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/images/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Images", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/images/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nImage object { b64_json, revised_prompt, url } Represents the content or the URL of an image generated by the OpenAI API.b64_json: optional stringThe base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.revised_prompt: optional stringFor `dall-e-3` only, the revised prompt that was used to generate the image.url: optional stringWhen using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models.formaturi\n\nImageEditCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.b64_json: stringBase64-encoded final edited image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the edited image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.completed\"The type of the event. Always `image_edit.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageEditPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested edited image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.partial_image\"The type of the event. Always `image_edit.partial_image`.\n\nImageEditStreamEvent = [ImageEditPartialImageEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_edit_partial_image_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } or [ImageEditCompletedEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_edit_completed_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.One of the following:ImageEditPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested edited image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.partial_image\"The type of the event. Always `image_edit.partial_image`.ImageEditCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.b64_json: stringBase64-encoded final edited image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the edited image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the edited image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the edited image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_edit.completed\"The type of the event. Always `image_edit.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageGenCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.b64_json: stringBase64-encoded image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the generated image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the generated image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the generated image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.completed\"The type of the event. Always `image_generation.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageGenPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.partial_image\"The type of the event. Always `image_generation.partial_image`.\n\nImageGenStreamEvent = [ImageGenPartialImageEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_gen_partial_image_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } or [ImageGenCompletedEvent](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image_gen_completed_event%20%3E%20(schema)) { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.One of the following:ImageGenPartialImageEvent object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.b64_json: stringBase64-encoded partial image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the requested image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the requested image.One of the following:\"png\"\"webp\"\"jpeg\"partial_image_index: number0-based index for the partial image (streaming).quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the requested image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.partial_image\"The type of the event. Always `image_generation.partial_image`.ImageGenCompletedEvent object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.b64_json: stringBase64-encoded image data, suitable for rendering as an image.background: \"transparent\" or \"opaque\" or \"auto\"The background setting for the generated image.One of the following:\"transparent\"\"opaque\"\"auto\"created_at: numberThe Unix timestamp when the event was created.formatunixtimeoutput_format: \"png\" or \"webp\" or \"jpeg\"The output format for the generated image.One of the following:\"png\"\"webp\"\"jpeg\"quality: \"low\" or \"medium\" or \"high\" or 3 moreThe quality setting for the generated image.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"\"auto\"size: string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\" or \"auto\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"\"auto\"type: \"image_generation.completed\"The type of the event. Always `image_generation.completed`.usage: object { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of image tokens in the output image.total_tokens: numberThe total number of tokens (images and text) used for the image generation.\n\nImageModel = \"gpt-image-1.5\" or \"gpt-image-2\" or \"gpt-image-2-2026-04-21\" or 8 moreOne of the following:\"gpt-image-1.5\"\"gpt-image-2\"\"gpt-image-2-2026-04-21\"\"gpt-image-2.5-sunburst\"\"gpt-image-2.5-sunburst-2026-09-08\"\"gpt-image-2.5-flare\"\"gpt-image-2.5-flare-2026-09-08\"\"dall-e-2\"\"dall-e-3\"\"gpt-image-1\"\"gpt-image-1-mini\"\n\nImagesResponse object { created, background, data, 4 more } The response from the image generation endpoint.created: numberThe Unix timestamp (in seconds) of when the image was created.formatunixtimebackground: optional \"transparent\" or \"opaque\"The background parameter used for the image generation. Either `transparent` or `opaque`.One of the following:\"transparent\"\"opaque\"data: optional array of [Image](/api/reference/resources/images#(resource)%20images%20%3E%20(model)%20image%20%3E%20(schema)) { b64_json, revised_prompt, url } The list of generated images.b64_json: optional stringThe base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.revised_prompt: optional stringFor `dall-e-3` only, the revised prompt that was used to generate the image.url: optional stringWhen using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models.formaturioutput_format: optional \"png\" or \"webp\" or \"jpeg\"The output format of the image generation. Either `png`, `webp`, or `jpeg`.One of the following:\"png\"\"webp\"\"jpeg\"quality: optional \"low\" or \"medium\" or \"high\" or 2 moreThe quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or `max`.One of the following:\"low\"\"medium\"\"high\"\"xhigh\"\"max\"size: optional string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:string\"1024x1024\" or \"1024x1536\" or \"1536x1024\"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.One of the following:\"1024x1024\"\"1024x1536\"\"1536x1024\"usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more } For `gpt-image-1` only, the token usage information for the image generation.input_tokens: numberThe number of tokens (images and text) in the input prompt.input_tokens_details: object { image_tokens, text_tokens } The input tokens detailed information for the image generation.image_tokens: numberThe number of image tokens in the input prompt.text_tokens: numberThe number of text tokens in the input prompt.output_tokens: numberThe number of output tokens generated by the model.total_tokens: numberThe total number of tokens (images and text) used for the image generation.output_tokens_details: optional object { image_tokens, text_tokens } The output token details for the image generation.image_tokens: numberThe number of image output tokens generated by the model.text_tokens: numberThe number of text output tokens generated by the model.", "znaku_textu": 16844, "slov": 2034, "odkazu": 544, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/images", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:17", "sha256": "fe7e4332e03494ebf8607e9e631fb7e63dd6445aa811d77325992645a3649b22", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/introduction", "titulek": "API Overview | OpenAI API Reference", "h1": "API Overview", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/overview/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "API Overview", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/overview/", "og:locale": "en", "og:site_name": "OpenAI API Reference", "og:image": "https://developers.openai.com/og/api/reference/overview.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 1, "text": "API Overview"}, {"uroven": 2, "text": "Start here"}, {"uroven": 2, "text": "Authentication"}, {"uroven": 2, "text": "Request headers"}, {"uroven": 2, "text": "Debugging requests"}, {"uroven": 3, "text": "Supplying your own request ID with X-Client-Request-Id"}, {"uroven": 2, "text": "Backwards compatibility"}], "markdown": "# API Overview\n\nUse this reference to look up OpenAI API endpoints, request and response\nschemas, streaming events, client library methods, and shared behavior such as\nauthentication, errors, rate limits, and request IDs.\n\n## Start here\n\nSection titled “Start here”\n\n1. Choose the API surface for your application:\n - [Responses](/api/reference/responses/overview) for direct model requests, tool use, audio, image, and text inputs, and stateful interactions.\n - [Realtime API](/api/docs/guides/realtime) for low-latency voice or audio sessions over WebRTC, WebSocket, or SIP. Use the [client events](/api/reference/resources/realtime/client-events) and [server events](/api/reference/resources/realtime/server-events) references while building sessions.\n - [Administration](/api/reference/administration/overview) for organization workflows such as users, invites, projects, API keys, and audit logs.\n2. Create credentials. Use a standard [API key](https://platform.openai.com/settings/organization/api-keys) for application requests, an [Admin API key](https://platform.openai.com/settings/organization/admin-keys) for Administration endpoints, or [workload identity federation](/api/docs/guides/workload-identity-federation) for short-lived access tokens.\n3. Install an official client library from the [libraries page](/api/docs/libraries) , or call the HTTP API directly from any environment that supports HTTP requests.\n4. Make a first request with the [developer quickstart](/api/docs/quickstart) or go straight to the [Responses create reference](/api/reference/resources/responses/methods/create) .\n5. Before production, review [error codes](/api/docs/guides/error-codes) , [rate limits](/api/docs/guides/rate-limits) , and request ID logging below.\n\n## Authentication\n\nSection titled “Authentication”\n\nThe OpenAI API accepts bearer credentials from API keys or from short-lived access tokens created with [workload identity federation](/api/docs/guides/workload-identity-federation).\n\n**Remember that your API key is a secret.** Don’t share it with others or expose it in any client-side code such as browsers or apps. Load API keys from an environment variable or key management service on the server.\n\nRevocations of an API key take effect within a few seconds. Most updates that\naffect authentication results of an API key propagate within 15 minutes, but\ncan potentially take longer.\n\nProvide API credentials with [HTTP Bearer authentication](https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/).\n\n```\nAuthorization: Bearer OPENAI_API_KEY_OR_ACCESS_TOKEN\n```\n\nIf you belong to more than one organization or access projects through a legacy user API key, pass a header to specify which organization and project to use for an API request:\n\n```\ncurl https://api.openai.com/v1/models \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"OpenAI-Organization: $ORGANIZATION_ID\" \\ -H \"OpenAI-Project: $PROJECT_ID\"\n```\n\nUsage from these API requests counts as usage for the specified organization and project. Find organization and project IDs in your [dashboard settings](https://platform.openai.com/settings/organization/general).\n\n## Request headers\n\nSection titled “Request headers”\n\nFor reliable behavior across API paths and HTTP versions, keep the total size\nof an API request’s headers under 64 KiB. This budget includes the names and\nvalues of all headers, including common headers such as `Authorization`,\n`Content-Type`, and `User-Agent`, as well as any custom headers.\n\nTo leave room for required headers and headers added by intermediaries, keep\nany individual custom header value and the total size of all custom header\nvalues at 60 KiB or less. Requests with larger headers may fail before they\nreach the API, so you may not receive a response or an `x-request-id`.\n\n## Debugging requests\n\nSection titled “Debugging requests”\n\n[Error codes](/api/docs/guides/error-codes) describe failures returned from API responses. Inspect HTTP response headers for the unique ID of a request and rate limit details. Common response headers include:\n\n**API meta information**\n\n- `openai-organization` : The [organization](/api/docs/guides/production-best-practices#setting-up-your-organization) associated with the request\n- `openai-processing-ms` : Time taken processing your API request\n- `openai-version` : REST API version used for this request (currently `2020-10-01` )\n- `x-request-id` : Unique identifier for this API request (used in troubleshooting)\n\n**[Rate limiting information](/api/docs/guides/rate-limits)**\n\n- `x-ratelimit-limit-requests`\n- `x-ratelimit-limit-tokens`\n- `x-ratelimit-remaining-requests`\n- `x-ratelimit-remaining-tokens`\n- `x-ratelimit-reset-requests`\n- `x-ratelimit-reset-tokens`\n- `x-ratelimit-limit-project-tokens`\n- `x-ratelimit-remaining-project-tokens`\n- `x-ratelimit-reset-project-tokens`\n\nProject-token headers may be present when a project-scoped token limit applies.\n\n**OpenAI recommends logging request IDs in production deployments** for more efficient troubleshooting with the [support team](https://help.openai.com/en/), should the need arise. Official [client libraries](/api/docs/libraries) provide a property on top-level response objects containing the value of the `x-request-id` header.\n\n### Supplying your own request ID with `X-Client-Request-Id`\n\nSection titled “Supplying your own request ID with X-Client-Request-Id”\n\nAlong with the server-generated `x-request-id`, you can supply your own unique identifier for each request via the `X-Client-Request-Id` request header. This header isn’t added automatically; you must explicitly set it on the request.\n\nWhen you include `X-Client-Request-Id`:\n\n- You control the ID format (for example, a UUID or your internal trace ID), but it must contain only ASCII characters and be no more than 512 characters long; otherwise, the request will fail with a 400 error. Make this value unique per request.\n- OpenAI logs this value internally for supported endpoints, including chat/completions, embeddings, responses, and more.\n- In cases like timeouts or network issues when you can’t get the `X-Request-Id` response header, you can share the `X-Client-Request-Id` value with the support team to look up whether OpenAI received the request and when.\n\n**Example:**\n\n```\ncurl https://api.openai.com/v1/chat/completions \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"X-Client-Request-Id: 123e4567-e89b-12d3-a456-426614174000\"\n```\n\n## Backwards compatibility\n\nSection titled “Backwards compatibility”\n\nOpenAI provides stability to API users by avoiding breaking changes in major API versions whenever reasonably possible. This includes:\n\n- The REST API (currently `v1` )\n- First-party [client libraries](/api/docs/libraries) (released libraries adhere to [semantic versioning](https://semver.org/) )\n- [Model](/api/docs/models) families (like `gpt-4o` or `o4-mini` )\n\n**Model prompting behavior between snapshots is subject to change**.\nModel outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run [evals](/api/docs/guides/evals) for your applications.\n\n**Backwards-compatible API changes**:\n\n- Adding new resources (URLs) to the REST API and client libraries\n- Adding new optional API parameters\n- Adding new properties to JSON response objects or event data\n- Changing the order of properties in a JSON response object\n- Changing the length or format of opaque strings, like resource identifiers\n- Adding new event types in streaming APIs\n\nSee the [changelog](/api/docs/changelog) for a list of backwards-compatible changes and rare breaking changes.", "znaku_textu": 7584, "slov": 1031, "odkazu": 390, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:27:30", "sha256": "5c877cb85fb6b9ce2017b7045cd56125a1316ccb8aa9cec8e3274a7eaf51d57c", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://platform.openai.com/settings/organization/api-keys", "https://platform.openai.com/settings/organization/admin-keys", "https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/", "https://platform.openai.com/settings/organization/general", "https://help.openai.com/en/", "https://semver.org/"]} {"url": "https://developers.openai.com/api/docs/api-reference/invite", "titulek": "Invites | OpenAI API Reference", "h1": "Invites", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/invites/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Invites", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/invites/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Admin", "Organization"], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nInvite object { id, created_at, email, 6 more } Represents an individual `invite` to the organization.id: stringThe identifier, which can be referenced in API endpointscreated_at: numberThe Unix timestamp (in seconds) of when the invite was sent.formatunixtimeemail: stringThe email address of the individual to whom the invite was sentobject: \"organization.invite\"The object type, which is always `organization.invite`projects: array of object { id, role } The projects that were granted membership upon acceptance of the invite.id: stringProject’s public IDrole: \"member\" or \"owner\"Project membership roleOne of the following:\"member\"\"owner\"role: \"owner\" or \"reader\"`owner` or `reader`One of the following:\"owner\"\"reader\"status: \"accepted\" or \"expired\" or \"pending\"`accepted`,`expired`, or `pending`One of the following:\"accepted\"\"expired\"\"pending\"accepted_at: optional number or nullThe Unix timestamp (in seconds) of when the invite was accepted.formatunixtimeexpires_at: optional number or nullThe Unix timestamp (in seconds) of when the invite expires.formatunixtime\n\nInviteDeleteResponse object { id, deleted, object } id: stringdeleted: booleanobject: \"organization.invite.deleted\"The object type, which is always `organization.invite.deleted`", "znaku_textu": 1264, "slov": 156, "odkazu": 394, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:02:28", "sha256": "a7515e76f3c375254a8520dc444aa5ee1ad76b092df206880def56104e8269dc", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/messages/createMessage", "titulek": "Assistants migration guide | OpenAI API", "h1": "Assistants migration guide", "popis": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/assistants/migration", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/assistants/migration", "og:site_name": "OpenAI Developers", "og:title": "Assistants migration guide | OpenAI API", "og:description": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "og:image": "https://developers.openai.com/og/api/docs/assistants/migration.png", "og:image:alt": "Assistants migration guide | OpenAI API", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 3, "text": "What’s changed?"}, {"uroven": 2, "text": "From assistants to prompts"}, {"uroven": 3, "text": "Why this is helpful"}, {"uroven": 3, "text": "Practical migration steps"}, {"uroven": 2, "text": "From threads to conversations"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "From runs to responses"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "Migrating your integration"}, {"uroven": 3, "text": "1. Create prompts from your assistants"}, {"uroven": 3, "text": "2. Move new user chats over to conversations and responses"}, {"uroven": 2, "text": "Comparing full examples"}, {"uroven": 3, "text": "User chat app"}], "markdown": "The Assistants API was officially sunset on August 26, 2026, and is no longer available. Use the [Responses API](/api/docs/guides/migrate-to-responses) for new integrations.\n\nThank you to everyone who used the Assistants API. We appreciate everything you built and the feedback you shared along the way.\n\nUse this guide to migrate your integration to the [Responses API](/api/docs/guides/migrate-to-responses).\n\nResponses are simpler—send input items and get output items back. With the Responses API, you also get better performance and new features like [deep research](/api/docs/guides/deep-research), [MCP](/api/docs/guides/tools-remote-mcp), and [computer use](/api/docs/guides/tools-computer-use). This change also lets you manage conversations instead of passing back `previous_response_id`.\n\n### What’s changed?\n\n| Before | Now | Why? |\n| --- | --- | --- |\n| `Assistants` | `Prompts` | Prompts hold configuration (model, tools, instructions) and are easier\nto version and update |\n| `Threads` | `Conversations` | Streams of items instead of just messages |\n| `Runs` | `Responses` | Responses send input items or use a conversation object and receive\noutput items; tool call loops are explicitly managed |\n| `Run steps` | `Items` | Generalized objects—can be messages, tool calls, outputs, and more |\n\n## From assistants to prompts\n\nAssistants were persistent API objects that bundled model choice, instructions, and tool declarations—created and managed entirely through the API. Their replacement, prompts, can only be created in the dashboard, where you can version them as you develop your product.\n\n### Why this is helpful\n\n- **Portability and versioning** : You can snapshot, review, diff, and roll back prompt specs. You can also version a prompt, so your code can just point the latest version.\n- **Separation of concerns** : Your application code now handles orchestration (history pruning, tool loop, retries) while your prompt focuses on high‑level behavior and constraints (system guidance, tool availability, structured output schema, temperature defaults).\n- **Realtime compatibility** : The same prompt configuration can be reused when you connect through the Realtime API, giving you a single definition of behavior across chat, streaming, and low‑latency interactive sessions.\n- **Tool and output consistency** : Using prompts, every Responses or Realtime session you start inherits a consistent contract because prompts encapsulate tool schemas and structured output expectations.\n\n### Practical migration steps\n\n1. Identify each existing Assistant’s *instruction + tool* bundle.\n2. In the dashboard, recreate that bundle as a named prompt.\n3. Store the prompt ID (or its exported spec) in source control so application code can refer to a stable identifier.\n4. During rollout, run A/B tests by swapping prompt IDs—no need to create or delete assistant objects programmatically.\n\nThink of a prompt as a **versioned behavioral profile** to plug into either Responses or Realtime API.\n\n---\n\n## From threads to conversations\n\nA thread was a collection of messages stored server-side. Threads could *only* store messages. Conversations store items, which can include messages, tool calls, tool outputs, and other data.\n\n### Request example\n\n#### Python\n\n`1 2 3 4thread = openai.beta.threads.create( messages=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )``1 2 3 4conversation = openai.conversations.create( items=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12thread, err := client.Beta.Threads.New(context.Background(), openai.BetaThreadNewParams{ Messages: []openai.BetaThreadNewParamsMessage{{ Role: \"user\", Content: openai.BetaThreadNewParamsMessageContentUnion{ OfString: openai.String(\"what are the 5 Ds of dodgeball?\"), }, }}, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }``1 2 3 4 5 6 7 8 9conversation, err := client.Conversations.New(context.Background(), conversations.ConversationNewParams{ Items: []responses.ResponseInputItemUnionParam{ responses.ResponseInputItemParamOfMessage(\"what are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9{ \"id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"object\": \"thread\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" }, \"tool_resources\": {} }``1 2 3 4 5 6 7 8{ \"id\": \"conv_68542dc602388199a30af27d040cefd4087a04b576bfeb24\", \"object\": \"conversation\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" } }`\n\n---\n\n## From runs to responses\n\nRuns were asynchronous processes that executed against threads. See the example below. Responses are simpler: provide a set of input items to execute, and get a list of output items back.\n\nResponses are designed to be used alone, but you can also use them with prompt and conversation objects for storing context and configuration.\n\n### Request example\n\n#### Python\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17# Replace the illustrative IDs and URLs below with your own resource values. import time from openai import OpenAI openai = OpenAI() thread_id = \"thread_123\" assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( thread_id=thread_id, assistant_id=assistant_id, ) while run.status in (\"queued\", \"in_progress\"): time.sleep(1) run = openai.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run.id)``1 2 3 4 5 6 7 8 9 10 11 12# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() conversation_id = \"conv_123\" response = openai.responses.create( model=\"gpt-6-astra\", input=[{\"role\": \"user\", \"content\": \"What are the 5 Ds of dodgeball?\"}], conversation=conversation_id, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13run, err := client.Beta.Threads.Runs.New(context.Background(), \"thread_abc123\", openai.BetaThreadRunNewParams{ AssistantID: \"asst_abc123\", }) if err != nil { panic(err) } for run.Status == openai.RunStatusQueued || run.Status == openai.RunStatusInProgress { time.Sleep(time.Second) run, err = client.Beta.Threads.Runs.Get(context.Background(), \"thread_abc123\", run.ID) if err != nil { panic(err) } }``1 2 3 4 5 6 7 8 9 10_, err := client.Responses.New(context.Background(), responses.ResponseNewParams{ Model: \"gpt-6-astra\", Input: responses.ResponseNewParamsInputUnion{OfInputItemList: responses.ResponseInputParam{ responses.ResponseInputItemParamOfMessage(\"What are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }}, Conversation: responses.ResponseNewParamsConversationUnion{OfString: openai.String(\"conv_abc123\")}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44{ \"id\": \"run_FKIpcs5ECSwuCmehBqsqkORj\", \"assistant_id\": \"asst_8fVY45hU3IM6creFkVi5MBKB\", \"cancelled_at\": null, \"completed_at\": 1752857327, \"created_at\": 1752857322, \"expires_at\": null, \"failed_at\": null, \"incomplete_details\": null, \"instructions\": null, \"last_error\": null, \"max_completion_tokens\": null, \"max_prompt_tokens\": null, \"metadata\": {}, \"model\": \"gpt-4.1\", \"object\": \"thread.run\", \"parallel_tool_calls\": true, \"required_action\": null, \"response_format\": \"auto\", \"started_at\": 1752857324, \"status\": \"completed\", \"thread_id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"tool_choice\": \"auto\", \"tools\": [], \"truncation_strategy\": { \"type\": \"auto\", \"last_messages\": null }, \"usage\": { \"completion_tokens\": 130, \"prompt_tokens\": 34, \"total_tokens\": 164, \"prompt_token_details\": { \"cached_tokens\": 0 }, \"completion_tokens_details\": { \"reasoning_tokens\": 0 } }, \"temperature\": 1.0, \"top_p\": 1.0, \"tool_resources\": {}, \"reasoning_effort\": null }``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76{ \"id\": \"resp_687a7b53036c819baad6012d58b39bcb074adcd9e24850fc\", \"created_at\": 1752857427, \"conversation\": { \"id\": \"conv_689667905b048191b4740501625afd940c7533ace33a2dab\" }, \"error\": null, \"incomplete_details\": null, \"instructions\": null, \"metadata\": {}, \"model\": \"gpt-5.5\", \"object\": \"response\", \"output\": [ { \"id\": \"msg_687a7b542948819ba79e77e14791ef83074adcd9e24850fc\", \"content\": [ { \"annotations\": [], \"text\": \"The \\\"5 Ds of Dodgeball\\\" are a humorous set of rules made famous by the 2004 comedy film **\\\"Dodgeball: A True Underdog Story.\\\"** In the movie, dodgeball coach Patches O’Houlihan teaches these basics to his team. The **5 Ds** are: 1. **Dodge** 2. **Duck** 3. **Dip** 4. **Dive** 5. **Dodge** (yes, dodge is listed twice for emphasis!) In summary: > **“If you can dodge a wrench, you can dodge a ball!”** These 5 Ds are not official competitive rules, but have become a fun and memorable pop culture reference for the sport of dodgeball.\", \"type\": \"output_text\", \"logprobs\": [] } ], \"role\": \"assistant\", \"status\": \"completed\", \"type\": \"message\" } ], \"parallel_tool_calls\": true, \"temperature\": 1.0, \"tool_choice\": \"auto\", \"tools\": [], \"top_p\": 1.0, \"background\": false, \"max_output_tokens\": null, \"previous_response_id\": null, \"reasoning\": { \"effort\": null, \"generate_summary\": null, \"summary\": null }, \"service_tier\": \"scale\", \"status\": \"completed\", \"text\": { \"format\": { \"type\": \"text\" } }, \"truncation\": \"disabled\", \"usage\": { \"input_tokens\": 17, \"input_tokens_details\": { \"cached_tokens\": 0 }, \"output_tokens\": 150, \"output_tokens_details\": { \"reasoning_tokens\": 0 }, \"total_tokens\": 167 }, \"user\": null, \"max_tool_calls\": null, \"store\": true, \"top_logprobs\": 0 }`\n\n---\n\n## Migrating your integration\n\nFollow the migration steps below to move from the Assistants API to the Responses API, without losing any feature support.\n\n### 1. Create prompts from your assistants\n\n1. Identify the most important assistant objects in your application.\n2. Find these in the dashboard and click `Create prompt` .\n\nThis will create a prompt object out of each existing assistant object.\n\nReusable prompt objects are also being deprecated. If you use this migration\npath, review the [prompts deprecation\ntimeline](/api/docs/deprecations#2026-06-03-reusable-prompts) before adopting\nprompt objects in a long-lived integration.\n\n### 2. Move new user chats over to conversations and responses\n\nStart new chats with the Conversations API and Responses API. To preserve earlier conversation history, use messages already stored by your application.\n\nThe example below shows how thread history could be migrated before the sunset. The Assistants API call that retrieves thread messages no longer works; use your stored messages instead.\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() messages = [] thread_id = \"thread_123\" for page in openai.beta.threads.messages.list( thread_id=thread_id, order=\"asc\" ).iter_pages(): messages += page.data items = [] for m in messages: item = {\"role\": m.role} item_content = [] for content in m.content: match content.type: case \"text\": item_content_type = \"input_text\" if m.role == \"user\" else \"output_text\" item_content += [ {\"type\": item_content_type, \"text\": content.text.value} ] case \"image_url\": item_content += [ { \"type\": \"input_image\", \"image_url\": content.image_url.url, \"detail\": content.image_url.detail, } ] item |= {\"content\": item_content} items.append(item) # create a conversation with your converted items conversation = openai.conversations.create(items=items)\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new thread_id = \"thread_123\" messages = client.beta.threads.messages.list(thread_id, order: :asc) items = [] messages.auto_paging_each do |message| content = message.content.filter_map do |part| case part when OpenAI::Models::Beta::Threads::TextContentBlock type = if message.role == OpenAI::Models::Beta::Threads::Message::Role::USER :input_text else :output_text end { type: type, text: part.text.value } when OpenAI::Models::Beta::Threads::ImageURLContentBlock { type: :input_image, image_url: part.image_url.url, detail: part.image_url.detail } end end items << { role: message.role, content: content } end conversation = client.conversations.create( items: items ) puts(conversation.id)\n```\n\n## Comparing full examples\n\nHere are a few examples of integrations using both the Assistants API and the Responses API so you can see how they compare.\n\n### User chat app\n\nAssistants API\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36# Replace the illustrative IDs and URLs below with your own resource values. threads_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): thread_id = threads_by_session.get(message.session_id) if thread_id is None: thread_id = openai.beta.threads.create().id threads_by_session[message.session_id] = thread_id openai.beta.threads.messages.create( thread_id=thread_id, role=\"user\", content=message.content, ) example_assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( assistant_id=example_assistant_id, thread_id=thread_id, ) while run.status in (\"queued\", \"in_progress\"): await asyncio.sleep(1) run = openai.beta.threads.runs.retrieve( thread_id=thread_id, run_id=run.id, ) messages = openai.beta.threads.messages.list( order=\"desc\", limit=1, thread_id=thread_id, ) return {\"content\": messages.data[0].content}``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new assistant_id = \"asst_123\" threads_by_session = {} handle_message = lambda do |session_id:, content:| thread_id = threads_by_session[session_id] unless thread_id thread_id = client.beta.threads.create.id threads_by_session[session_id] = thread_id end client.beta.threads.messages.create( thread_id, role: :user, content: content ) run = client.beta.threads.runs.create( thread_id, assistant_id: assistant_id ) while [:queued, :in_progress].include?(run.status) sleep(1) run = client.beta.threads.runs.retrieve(run.id, thread_id: thread_id) end messages = client.beta.threads.messages.list( thread_id, order: :desc, limit: 1 ) { content: messages.data&.first&.content } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )`\n\nResponses API\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50// Replace the illustrative IDs and URLs below with your own resource values. import express from \"express\"; import OpenAI from \"openai\"; const app = express(); const client = new OpenAI(); const conversationsBySession = new Map(); app.use(express.json()); app.post(\"/messages\", async (request, response) => { const { content, session_id: sessionId } = request.body ?? {}; if ( typeof content !== \"string\" || !content.trim() || typeof sessionId !== \"string\" || !sessionId.trim() ) { response.status(400).json({ error: \"content and session_id must be non-empty strings.\", }); return; } let conversationIdPromise = conversationsBySession.get(sessionId); if (!conversationIdPromise) { conversationIdPromise = client.conversations .create() .then((conversation) => conversation.id) .catch((error) => { conversationsBySession.delete(sessionId); throw error; }); conversationsBySession.set(sessionId, conversationIdPromise); } const conversationId = await conversationIdPromise; const promptId = \"pmpt_123\"; const result = await client.responses.create({ prompt: { id: promptId }, input: [{ role: \"user\", content }], conversation: conversationId, }); response.json({ content: result.output_text }); }); app.listen(Number(process.env.OPENAI_EXAMPLE_PORT ?? 8000), \"127.0.0.1\");\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19# Replace the illustrative IDs and URLs below with your own resource values. conversations_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): conversation_id = conversations_by_session.get(message.session_id) if conversation_id is None: conversation_id = openai.conversations.create().id conversations_by_session[message.session_id] = conversation_id example_prompt_id = \"pmpt_123\" response = openai.responses.create( prompt={\"id\": example_prompt_id}, input=[{\"role\": \"user\", \"content\": message.content}], conversation=conversation_id, ) return {\"content\": response.output_text}\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new conversations_by_session = {} handle_message = lambda do |session_id:, content:| conversation_id = conversations_by_session[session_id] unless conversation_id conversation_id = client.conversations.create.id conversations_by_session[session_id] = conversation_id end response = client.responses.create( prompt: { id: \"pmpt_123\" }, input: [ { role: :user, content: content } ], conversation: conversation_id ) { content: response.output_text } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )\n```", "znaku_textu": 17534, "slov": 2354, "odkazu": 474, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/assistants", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:10", "sha256": "53f9f37febb4259ae4be52a7a71feffb70531c2e9814bd13d739f9ad6e049109", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/api-reference/messages/deleteMessage", "titulek": "Assistants migration guide | OpenAI API", "h1": "Assistants migration guide", "popis": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/assistants/migration", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/assistants/migration", "og:site_name": "OpenAI Developers", "og:title": "Assistants migration guide | OpenAI API", "og:description": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "og:image": "https://developers.openai.com/og/api/docs/assistants/migration.png", "og:image:alt": "Assistants migration guide | OpenAI API", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 3, "text": "What’s changed?"}, {"uroven": 2, "text": "From assistants to prompts"}, {"uroven": 3, "text": "Why this is helpful"}, {"uroven": 3, "text": "Practical migration steps"}, {"uroven": 2, "text": "From threads to conversations"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "From runs to responses"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "Migrating your integration"}, {"uroven": 3, "text": "1. Create prompts from your assistants"}, {"uroven": 3, "text": "2. Move new user chats over to conversations and responses"}, {"uroven": 2, "text": "Comparing full examples"}, {"uroven": 3, "text": "User chat app"}], "markdown": "The Assistants API was officially sunset on August 26, 2026, and is no longer available. Use the [Responses API](/api/docs/guides/migrate-to-responses) for new integrations.\n\nThank you to everyone who used the Assistants API. We appreciate everything you built and the feedback you shared along the way.\n\nUse this guide to migrate your integration to the [Responses API](/api/docs/guides/migrate-to-responses).\n\nResponses are simpler—send input items and get output items back. With the Responses API, you also get better performance and new features like [deep research](/api/docs/guides/deep-research), [MCP](/api/docs/guides/tools-remote-mcp), and [computer use](/api/docs/guides/tools-computer-use). This change also lets you manage conversations instead of passing back `previous_response_id`.\n\n### What’s changed?\n\n| Before | Now | Why? |\n| --- | --- | --- |\n| `Assistants` | `Prompts` | Prompts hold configuration (model, tools, instructions) and are easier\nto version and update |\n| `Threads` | `Conversations` | Streams of items instead of just messages |\n| `Runs` | `Responses` | Responses send input items or use a conversation object and receive\noutput items; tool call loops are explicitly managed |\n| `Run steps` | `Items` | Generalized objects—can be messages, tool calls, outputs, and more |\n\n## From assistants to prompts\n\nAssistants were persistent API objects that bundled model choice, instructions, and tool declarations—created and managed entirely through the API. Their replacement, prompts, can only be created in the dashboard, where you can version them as you develop your product.\n\n### Why this is helpful\n\n- **Portability and versioning** : You can snapshot, review, diff, and roll back prompt specs. You can also version a prompt, so your code can just point the latest version.\n- **Separation of concerns** : Your application code now handles orchestration (history pruning, tool loop, retries) while your prompt focuses on high‑level behavior and constraints (system guidance, tool availability, structured output schema, temperature defaults).\n- **Realtime compatibility** : The same prompt configuration can be reused when you connect through the Realtime API, giving you a single definition of behavior across chat, streaming, and low‑latency interactive sessions.\n- **Tool and output consistency** : Using prompts, every Responses or Realtime session you start inherits a consistent contract because prompts encapsulate tool schemas and structured output expectations.\n\n### Practical migration steps\n\n1. Identify each existing Assistant’s *instruction + tool* bundle.\n2. In the dashboard, recreate that bundle as a named prompt.\n3. Store the prompt ID (or its exported spec) in source control so application code can refer to a stable identifier.\n4. During rollout, run A/B tests by swapping prompt IDs—no need to create or delete assistant objects programmatically.\n\nThink of a prompt as a **versioned behavioral profile** to plug into either Responses or Realtime API.\n\n---\n\n## From threads to conversations\n\nA thread was a collection of messages stored server-side. Threads could *only* store messages. Conversations store items, which can include messages, tool calls, tool outputs, and other data.\n\n### Request example\n\n#### Python\n\n`1 2 3 4thread = openai.beta.threads.create( messages=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )``1 2 3 4conversation = openai.conversations.create( items=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12thread, err := client.Beta.Threads.New(context.Background(), openai.BetaThreadNewParams{ Messages: []openai.BetaThreadNewParamsMessage{{ Role: \"user\", Content: openai.BetaThreadNewParamsMessageContentUnion{ OfString: openai.String(\"what are the 5 Ds of dodgeball?\"), }, }}, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }``1 2 3 4 5 6 7 8 9conversation, err := client.Conversations.New(context.Background(), conversations.ConversationNewParams{ Items: []responses.ResponseInputItemUnionParam{ responses.ResponseInputItemParamOfMessage(\"what are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9{ \"id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"object\": \"thread\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" }, \"tool_resources\": {} }``1 2 3 4 5 6 7 8{ \"id\": \"conv_68542dc602388199a30af27d040cefd4087a04b576bfeb24\", \"object\": \"conversation\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" } }`\n\n---\n\n## From runs to responses\n\nRuns were asynchronous processes that executed against threads. See the example below. Responses are simpler: provide a set of input items to execute, and get a list of output items back.\n\nResponses are designed to be used alone, but you can also use them with prompt and conversation objects for storing context and configuration.\n\n### Request example\n\n#### Python\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17# Replace the illustrative IDs and URLs below with your own resource values. import time from openai import OpenAI openai = OpenAI() thread_id = \"thread_123\" assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( thread_id=thread_id, assistant_id=assistant_id, ) while run.status in (\"queued\", \"in_progress\"): time.sleep(1) run = openai.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run.id)``1 2 3 4 5 6 7 8 9 10 11 12# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() conversation_id = \"conv_123\" response = openai.responses.create( model=\"gpt-6-astra\", input=[{\"role\": \"user\", \"content\": \"What are the 5 Ds of dodgeball?\"}], conversation=conversation_id, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13run, err := client.Beta.Threads.Runs.New(context.Background(), \"thread_abc123\", openai.BetaThreadRunNewParams{ AssistantID: \"asst_abc123\", }) if err != nil { panic(err) } for run.Status == openai.RunStatusQueued || run.Status == openai.RunStatusInProgress { time.Sleep(time.Second) run, err = client.Beta.Threads.Runs.Get(context.Background(), \"thread_abc123\", run.ID) if err != nil { panic(err) } }``1 2 3 4 5 6 7 8 9 10_, err := client.Responses.New(context.Background(), responses.ResponseNewParams{ Model: \"gpt-6-astra\", Input: responses.ResponseNewParamsInputUnion{OfInputItemList: responses.ResponseInputParam{ responses.ResponseInputItemParamOfMessage(\"What are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }}, Conversation: responses.ResponseNewParamsConversationUnion{OfString: openai.String(\"conv_abc123\")}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44{ \"id\": \"run_FKIpcs5ECSwuCmehBqsqkORj\", \"assistant_id\": \"asst_8fVY45hU3IM6creFkVi5MBKB\", \"cancelled_at\": null, \"completed_at\": 1752857327, \"created_at\": 1752857322, \"expires_at\": null, \"failed_at\": null, \"incomplete_details\": null, \"instructions\": null, \"last_error\": null, \"max_completion_tokens\": null, \"max_prompt_tokens\": null, \"metadata\": {}, \"model\": \"gpt-4.1\", \"object\": \"thread.run\", \"parallel_tool_calls\": true, \"required_action\": null, \"response_format\": \"auto\", \"started_at\": 1752857324, \"status\": \"completed\", \"thread_id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"tool_choice\": \"auto\", \"tools\": [], \"truncation_strategy\": { \"type\": \"auto\", \"last_messages\": null }, \"usage\": { \"completion_tokens\": 130, \"prompt_tokens\": 34, \"total_tokens\": 164, \"prompt_token_details\": { \"cached_tokens\": 0 }, \"completion_tokens_details\": { \"reasoning_tokens\": 0 } }, \"temperature\": 1.0, \"top_p\": 1.0, \"tool_resources\": {}, \"reasoning_effort\": null }``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76{ \"id\": \"resp_687a7b53036c819baad6012d58b39bcb074adcd9e24850fc\", \"created_at\": 1752857427, \"conversation\": { \"id\": \"conv_689667905b048191b4740501625afd940c7533ace33a2dab\" }, \"error\": null, \"incomplete_details\": null, \"instructions\": null, \"metadata\": {}, \"model\": \"gpt-5.5\", \"object\": \"response\", \"output\": [ { \"id\": \"msg_687a7b542948819ba79e77e14791ef83074adcd9e24850fc\", \"content\": [ { \"annotations\": [], \"text\": \"The \\\"5 Ds of Dodgeball\\\" are a humorous set of rules made famous by the 2004 comedy film **\\\"Dodgeball: A True Underdog Story.\\\"** In the movie, dodgeball coach Patches O’Houlihan teaches these basics to his team. The **5 Ds** are: 1. **Dodge** 2. **Duck** 3. **Dip** 4. **Dive** 5. **Dodge** (yes, dodge is listed twice for emphasis!) In summary: > **“If you can dodge a wrench, you can dodge a ball!”** These 5 Ds are not official competitive rules, but have become a fun and memorable pop culture reference for the sport of dodgeball.\", \"type\": \"output_text\", \"logprobs\": [] } ], \"role\": \"assistant\", \"status\": \"completed\", \"type\": \"message\" } ], \"parallel_tool_calls\": true, \"temperature\": 1.0, \"tool_choice\": \"auto\", \"tools\": [], \"top_p\": 1.0, \"background\": false, \"max_output_tokens\": null, \"previous_response_id\": null, \"reasoning\": { \"effort\": null, \"generate_summary\": null, \"summary\": null }, \"service_tier\": \"scale\", \"status\": \"completed\", \"text\": { \"format\": { \"type\": \"text\" } }, \"truncation\": \"disabled\", \"usage\": { \"input_tokens\": 17, \"input_tokens_details\": { \"cached_tokens\": 0 }, \"output_tokens\": 150, \"output_tokens_details\": { \"reasoning_tokens\": 0 }, \"total_tokens\": 167 }, \"user\": null, \"max_tool_calls\": null, \"store\": true, \"top_logprobs\": 0 }`\n\n---\n\n## Migrating your integration\n\nFollow the migration steps below to move from the Assistants API to the Responses API, without losing any feature support.\n\n### 1. Create prompts from your assistants\n\n1. Identify the most important assistant objects in your application.\n2. Find these in the dashboard and click `Create prompt` .\n\nThis will create a prompt object out of each existing assistant object.\n\nReusable prompt objects are also being deprecated. If you use this migration\npath, review the [prompts deprecation\ntimeline](/api/docs/deprecations#2026-06-03-reusable-prompts) before adopting\nprompt objects in a long-lived integration.\n\n### 2. Move new user chats over to conversations and responses\n\nStart new chats with the Conversations API and Responses API. To preserve earlier conversation history, use messages already stored by your application.\n\nThe example below shows how thread history could be migrated before the sunset. The Assistants API call that retrieves thread messages no longer works; use your stored messages instead.\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() messages = [] thread_id = \"thread_123\" for page in openai.beta.threads.messages.list( thread_id=thread_id, order=\"asc\" ).iter_pages(): messages += page.data items = [] for m in messages: item = {\"role\": m.role} item_content = [] for content in m.content: match content.type: case \"text\": item_content_type = \"input_text\" if m.role == \"user\" else \"output_text\" item_content += [ {\"type\": item_content_type, \"text\": content.text.value} ] case \"image_url\": item_content += [ { \"type\": \"input_image\", \"image_url\": content.image_url.url, \"detail\": content.image_url.detail, } ] item |= {\"content\": item_content} items.append(item) # create a conversation with your converted items conversation = openai.conversations.create(items=items)\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new thread_id = \"thread_123\" messages = client.beta.threads.messages.list(thread_id, order: :asc) items = [] messages.auto_paging_each do |message| content = message.content.filter_map do |part| case part when OpenAI::Models::Beta::Threads::TextContentBlock type = if message.role == OpenAI::Models::Beta::Threads::Message::Role::USER :input_text else :output_text end { type: type, text: part.text.value } when OpenAI::Models::Beta::Threads::ImageURLContentBlock { type: :input_image, image_url: part.image_url.url, detail: part.image_url.detail } end end items << { role: message.role, content: content } end conversation = client.conversations.create( items: items ) puts(conversation.id)\n```\n\n## Comparing full examples\n\nHere are a few examples of integrations using both the Assistants API and the Responses API so you can see how they compare.\n\n### User chat app\n\nAssistants API\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36# Replace the illustrative IDs and URLs below with your own resource values. threads_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): thread_id = threads_by_session.get(message.session_id) if thread_id is None: thread_id = openai.beta.threads.create().id threads_by_session[message.session_id] = thread_id openai.beta.threads.messages.create( thread_id=thread_id, role=\"user\", content=message.content, ) example_assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( assistant_id=example_assistant_id, thread_id=thread_id, ) while run.status in (\"queued\", \"in_progress\"): await asyncio.sleep(1) run = openai.beta.threads.runs.retrieve( thread_id=thread_id, run_id=run.id, ) messages = openai.beta.threads.messages.list( order=\"desc\", limit=1, thread_id=thread_id, ) return {\"content\": messages.data[0].content}``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new assistant_id = \"asst_123\" threads_by_session = {} handle_message = lambda do |session_id:, content:| thread_id = threads_by_session[session_id] unless thread_id thread_id = client.beta.threads.create.id threads_by_session[session_id] = thread_id end client.beta.threads.messages.create( thread_id, role: :user, content: content ) run = client.beta.threads.runs.create( thread_id, assistant_id: assistant_id ) while [:queued, :in_progress].include?(run.status) sleep(1) run = client.beta.threads.runs.retrieve(run.id, thread_id: thread_id) end messages = client.beta.threads.messages.list( thread_id, order: :desc, limit: 1 ) { content: messages.data&.first&.content } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )`\n\nResponses API\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50// Replace the illustrative IDs and URLs below with your own resource values. import express from \"express\"; import OpenAI from \"openai\"; const app = express(); const client = new OpenAI(); const conversationsBySession = new Map(); app.use(express.json()); app.post(\"/messages\", async (request, response) => { const { content, session_id: sessionId } = request.body ?? {}; if ( typeof content !== \"string\" || !content.trim() || typeof sessionId !== \"string\" || !sessionId.trim() ) { response.status(400).json({ error: \"content and session_id must be non-empty strings.\", }); return; } let conversationIdPromise = conversationsBySession.get(sessionId); if (!conversationIdPromise) { conversationIdPromise = client.conversations .create() .then((conversation) => conversation.id) .catch((error) => { conversationsBySession.delete(sessionId); throw error; }); conversationsBySession.set(sessionId, conversationIdPromise); } const conversationId = await conversationIdPromise; const promptId = \"pmpt_123\"; const result = await client.responses.create({ prompt: { id: promptId }, input: [{ role: \"user\", content }], conversation: conversationId, }); response.json({ content: result.output_text }); }); app.listen(Number(process.env.OPENAI_EXAMPLE_PORT ?? 8000), \"127.0.0.1\");\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19# Replace the illustrative IDs and URLs below with your own resource values. conversations_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): conversation_id = conversations_by_session.get(message.session_id) if conversation_id is None: conversation_id = openai.conversations.create().id conversations_by_session[message.session_id] = conversation_id example_prompt_id = \"pmpt_123\" response = openai.responses.create( prompt={\"id\": example_prompt_id}, input=[{\"role\": \"user\", \"content\": message.content}], conversation=conversation_id, ) return {\"content\": response.output_text}\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new conversations_by_session = {} handle_message = lambda do |session_id:, content:| conversation_id = conversations_by_session[session_id] unless conversation_id conversation_id = client.conversations.create.id conversations_by_session[session_id] = conversation_id end response = client.responses.create( prompt: { id: \"pmpt_123\" }, input: [ { role: :user, content: content } ], conversation: conversation_id ) { content: response.output_text } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )\n```", "znaku_textu": 17534, "slov": 2354, "odkazu": 474, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/assistants", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:51:53", "sha256": "53f9f37febb4259ae4be52a7a71feffb70531c2e9814bd13d739f9ad6e049109", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/api-reference/messages/listMessages", "titulek": "Assistants migration guide | OpenAI API", "h1": "Assistants migration guide", "popis": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/docs/assistants/migration", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:url": "https://developers.openai.com/api/docs/assistants/migration", "og:site_name": "OpenAI Developers", "og:title": "Assistants migration guide | OpenAI API", "og:description": "Migrate from the retired Assistants API to the Responses API, with side-by-side comparisons and updated patterns.", "og:image": "https://developers.openai.com/og/api/docs/assistants/migration.png", "og:image:alt": "Assistants migration guide | OpenAI API", "og:image:type": "image/png", "og:image:width": "1200", "og:image:height": "630"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 3, "text": "What’s changed?"}, {"uroven": 2, "text": "From assistants to prompts"}, {"uroven": 3, "text": "Why this is helpful"}, {"uroven": 3, "text": "Practical migration steps"}, {"uroven": 2, "text": "From threads to conversations"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "From runs to responses"}, {"uroven": 3, "text": "Request example"}, {"uroven": 4, "text": "Python"}, {"uroven": 4, "text": "Go"}, {"uroven": 3, "text": "Response example"}, {"uroven": 2, "text": "Migrating your integration"}, {"uroven": 3, "text": "1. Create prompts from your assistants"}, {"uroven": 3, "text": "2. Move new user chats over to conversations and responses"}, {"uroven": 2, "text": "Comparing full examples"}, {"uroven": 3, "text": "User chat app"}], "markdown": "The Assistants API was officially sunset on August 26, 2026, and is no longer available. Use the [Responses API](/api/docs/guides/migrate-to-responses) for new integrations.\n\nThank you to everyone who used the Assistants API. We appreciate everything you built and the feedback you shared along the way.\n\nUse this guide to migrate your integration to the [Responses API](/api/docs/guides/migrate-to-responses).\n\nResponses are simpler—send input items and get output items back. With the Responses API, you also get better performance and new features like [deep research](/api/docs/guides/deep-research), [MCP](/api/docs/guides/tools-remote-mcp), and [computer use](/api/docs/guides/tools-computer-use). This change also lets you manage conversations instead of passing back `previous_response_id`.\n\n### What’s changed?\n\n| Before | Now | Why? |\n| --- | --- | --- |\n| `Assistants` | `Prompts` | Prompts hold configuration (model, tools, instructions) and are easier\nto version and update |\n| `Threads` | `Conversations` | Streams of items instead of just messages |\n| `Runs` | `Responses` | Responses send input items or use a conversation object and receive\noutput items; tool call loops are explicitly managed |\n| `Run steps` | `Items` | Generalized objects—can be messages, tool calls, outputs, and more |\n\n## From assistants to prompts\n\nAssistants were persistent API objects that bundled model choice, instructions, and tool declarations—created and managed entirely through the API. Their replacement, prompts, can only be created in the dashboard, where you can version them as you develop your product.\n\n### Why this is helpful\n\n- **Portability and versioning** : You can snapshot, review, diff, and roll back prompt specs. You can also version a prompt, so your code can just point the latest version.\n- **Separation of concerns** : Your application code now handles orchestration (history pruning, tool loop, retries) while your prompt focuses on high‑level behavior and constraints (system guidance, tool availability, structured output schema, temperature defaults).\n- **Realtime compatibility** : The same prompt configuration can be reused when you connect through the Realtime API, giving you a single definition of behavior across chat, streaming, and low‑latency interactive sessions.\n- **Tool and output consistency** : Using prompts, every Responses or Realtime session you start inherits a consistent contract because prompts encapsulate tool schemas and structured output expectations.\n\n### Practical migration steps\n\n1. Identify each existing Assistant’s *instruction + tool* bundle.\n2. In the dashboard, recreate that bundle as a named prompt.\n3. Store the prompt ID (or its exported spec) in source control so application code can refer to a stable identifier.\n4. During rollout, run A/B tests by swapping prompt IDs—no need to create or delete assistant objects programmatically.\n\nThink of a prompt as a **versioned behavioral profile** to plug into either Responses or Realtime API.\n\n---\n\n## From threads to conversations\n\nA thread was a collection of messages stored server-side. Threads could *only* store messages. Conversations store items, which can include messages, tool calls, tool outputs, and other data.\n\n### Request example\n\n#### Python\n\n`1 2 3 4thread = openai.beta.threads.create( messages=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )``1 2 3 4conversation = openai.conversations.create( items=[{\"role\": \"user\", \"content\": \"what are the 5 Ds of dodgeball?\"}], metadata={\"user_id\": \"peter_le_fleur\"}, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12thread, err := client.Beta.Threads.New(context.Background(), openai.BetaThreadNewParams{ Messages: []openai.BetaThreadNewParamsMessage{{ Role: \"user\", Content: openai.BetaThreadNewParamsMessageContentUnion{ OfString: openai.String(\"what are the 5 Ds of dodgeball?\"), }, }}, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }``1 2 3 4 5 6 7 8 9conversation, err := client.Conversations.New(context.Background(), conversations.ConversationNewParams{ Items: []responses.ResponseInputItemUnionParam{ responses.ResponseInputItemParamOfMessage(\"what are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }, Metadata: shared.Metadata{\"user_id\": \"peter_le_fleur\"}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9{ \"id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"object\": \"thread\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" }, \"tool_resources\": {} }``1 2 3 4 5 6 7 8{ \"id\": \"conv_68542dc602388199a30af27d040cefd4087a04b576bfeb24\", \"object\": \"conversation\", \"created_at\": 1752855924, \"metadata\": { \"user_id\": \"peter_le_fleur\" } }`\n\n---\n\n## From runs to responses\n\nRuns were asynchronous processes that executed against threads. See the example below. Responses are simpler: provide a set of input items to execute, and get a list of output items back.\n\nResponses are designed to be used alone, but you can also use them with prompt and conversation objects for storing context and configuration.\n\n### Request example\n\n#### Python\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17# Replace the illustrative IDs and URLs below with your own resource values. import time from openai import OpenAI openai = OpenAI() thread_id = \"thread_123\" assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( thread_id=thread_id, assistant_id=assistant_id, ) while run.status in (\"queued\", \"in_progress\"): time.sleep(1) run = openai.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run.id)``1 2 3 4 5 6 7 8 9 10 11 12# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() conversation_id = \"conv_123\" response = openai.responses.create( model=\"gpt-6-astra\", input=[{\"role\": \"user\", \"content\": \"What are the 5 Ds of dodgeball?\"}], conversation=conversation_id, )`\n\n#### Go\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13run, err := client.Beta.Threads.Runs.New(context.Background(), \"thread_abc123\", openai.BetaThreadRunNewParams{ AssistantID: \"asst_abc123\", }) if err != nil { panic(err) } for run.Status == openai.RunStatusQueued || run.Status == openai.RunStatusInProgress { time.Sleep(time.Second) run, err = client.Beta.Threads.Runs.Get(context.Background(), \"thread_abc123\", run.ID) if err != nil { panic(err) } }``1 2 3 4 5 6 7 8 9 10_, err := client.Responses.New(context.Background(), responses.ResponseNewParams{ Model: \"gpt-6-astra\", Input: responses.ResponseNewParamsInputUnion{OfInputItemList: responses.ResponseInputParam{ responses.ResponseInputItemParamOfMessage(\"What are the 5 Ds of dodgeball?\", responses.EasyInputMessageRoleUser), }}, Conversation: responses.ResponseNewParamsConversationUnion{OfString: openai.String(\"conv_abc123\")}, }) if err != nil { panic(err) }`\n\n### Response example\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44{ \"id\": \"run_FKIpcs5ECSwuCmehBqsqkORj\", \"assistant_id\": \"asst_8fVY45hU3IM6creFkVi5MBKB\", \"cancelled_at\": null, \"completed_at\": 1752857327, \"created_at\": 1752857322, \"expires_at\": null, \"failed_at\": null, \"incomplete_details\": null, \"instructions\": null, \"last_error\": null, \"max_completion_tokens\": null, \"max_prompt_tokens\": null, \"metadata\": {}, \"model\": \"gpt-4.1\", \"object\": \"thread.run\", \"parallel_tool_calls\": true, \"required_action\": null, \"response_format\": \"auto\", \"started_at\": 1752857324, \"status\": \"completed\", \"thread_id\": \"thread_CrXtCzcyEQbkAcXuNmVSKFs1\", \"tool_choice\": \"auto\", \"tools\": [], \"truncation_strategy\": { \"type\": \"auto\", \"last_messages\": null }, \"usage\": { \"completion_tokens\": 130, \"prompt_tokens\": 34, \"total_tokens\": 164, \"prompt_token_details\": { \"cached_tokens\": 0 }, \"completion_tokens_details\": { \"reasoning_tokens\": 0 } }, \"temperature\": 1.0, \"top_p\": 1.0, \"tool_resources\": {}, \"reasoning_effort\": null }``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76{ \"id\": \"resp_687a7b53036c819baad6012d58b39bcb074adcd9e24850fc\", \"created_at\": 1752857427, \"conversation\": { \"id\": \"conv_689667905b048191b4740501625afd940c7533ace33a2dab\" }, \"error\": null, \"incomplete_details\": null, \"instructions\": null, \"metadata\": {}, \"model\": \"gpt-5.5\", \"object\": \"response\", \"output\": [ { \"id\": \"msg_687a7b542948819ba79e77e14791ef83074adcd9e24850fc\", \"content\": [ { \"annotations\": [], \"text\": \"The \\\"5 Ds of Dodgeball\\\" are a humorous set of rules made famous by the 2004 comedy film **\\\"Dodgeball: A True Underdog Story.\\\"** In the movie, dodgeball coach Patches O’Houlihan teaches these basics to his team. The **5 Ds** are: 1. **Dodge** 2. **Duck** 3. **Dip** 4. **Dive** 5. **Dodge** (yes, dodge is listed twice for emphasis!) In summary: > **“If you can dodge a wrench, you can dodge a ball!”** These 5 Ds are not official competitive rules, but have become a fun and memorable pop culture reference for the sport of dodgeball.\", \"type\": \"output_text\", \"logprobs\": [] } ], \"role\": \"assistant\", \"status\": \"completed\", \"type\": \"message\" } ], \"parallel_tool_calls\": true, \"temperature\": 1.0, \"tool_choice\": \"auto\", \"tools\": [], \"top_p\": 1.0, \"background\": false, \"max_output_tokens\": null, \"previous_response_id\": null, \"reasoning\": { \"effort\": null, \"generate_summary\": null, \"summary\": null }, \"service_tier\": \"scale\", \"status\": \"completed\", \"text\": { \"format\": { \"type\": \"text\" } }, \"truncation\": \"disabled\", \"usage\": { \"input_tokens\": 17, \"input_tokens_details\": { \"cached_tokens\": 0 }, \"output_tokens\": 150, \"output_tokens_details\": { \"reasoning_tokens\": 0 }, \"total_tokens\": 167 }, \"user\": null, \"max_tool_calls\": null, \"store\": true, \"top_logprobs\": 0 }`\n\n---\n\n## Migrating your integration\n\nFollow the migration steps below to move from the Assistants API to the Responses API, without losing any feature support.\n\n### 1. Create prompts from your assistants\n\n1. Identify the most important assistant objects in your application.\n2. Find these in the dashboard and click `Create prompt` .\n\nThis will create a prompt object out of each existing assistant object.\n\nReusable prompt objects are also being deprecated. If you use this migration\npath, review the [prompts deprecation\ntimeline](/api/docs/deprecations#2026-06-03-reusable-prompts) before adopting\nprompt objects in a long-lived integration.\n\n### 2. Move new user chats over to conversations and responses\n\nStart new chats with the Conversations API and Responses API. To preserve earlier conversation history, use messages already stored by your application.\n\nThe example below shows how thread history could be migrated before the sunset. The Assistants API call that retrieves thread messages no longer works; use your stored messages instead.\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39# Replace the illustrative IDs and URLs below with your own resource values. from openai import OpenAI openai = OpenAI() messages = [] thread_id = \"thread_123\" for page in openai.beta.threads.messages.list( thread_id=thread_id, order=\"asc\" ).iter_pages(): messages += page.data items = [] for m in messages: item = {\"role\": m.role} item_content = [] for content in m.content: match content.type: case \"text\": item_content_type = \"input_text\" if m.role == \"user\" else \"output_text\" item_content += [ {\"type\": item_content_type, \"text\": content.text.value} ] case \"image_url\": item_content += [ { \"type\": \"input_image\", \"image_url\": content.image_url.url, \"detail\": content.image_url.detail, } ] item |= {\"content\": item_content} items.append(item) # create a conversation with your converted items conversation = openai.conversations.create(items=items)\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new thread_id = \"thread_123\" messages = client.beta.threads.messages.list(thread_id, order: :asc) items = [] messages.auto_paging_each do |message| content = message.content.filter_map do |part| case part when OpenAI::Models::Beta::Threads::TextContentBlock type = if message.role == OpenAI::Models::Beta::Threads::Message::Role::USER :input_text else :output_text end { type: type, text: part.text.value } when OpenAI::Models::Beta::Threads::ImageURLContentBlock { type: :input_image, image_url: part.image_url.url, detail: part.image_url.detail } end end items << { role: message.role, content: content } end conversation = client.conversations.create( items: items ) puts(conversation.id)\n```\n\n## Comparing full examples\n\nHere are a few examples of integrations using both the Assistants API and the Responses API so you can see how they compare.\n\n### User chat app\n\nAssistants API\n\n`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36# Replace the illustrative IDs and URLs below with your own resource values. threads_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): thread_id = threads_by_session.get(message.session_id) if thread_id is None: thread_id = openai.beta.threads.create().id threads_by_session[message.session_id] = thread_id openai.beta.threads.messages.create( thread_id=thread_id, role=\"user\", content=message.content, ) example_assistant_id = \"asst_123\" run = openai.beta.threads.runs.create( assistant_id=example_assistant_id, thread_id=thread_id, ) while run.status in (\"queued\", \"in_progress\"): await asyncio.sleep(1) run = openai.beta.threads.runs.retrieve( thread_id=thread_id, run_id=run.id, ) messages = openai.beta.threads.messages.list( order=\"desc\", limit=1, thread_id=thread_id, ) return {\"content\": messages.data[0].content}``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new assistant_id = \"asst_123\" threads_by_session = {} handle_message = lambda do |session_id:, content:| thread_id = threads_by_session[session_id] unless thread_id thread_id = client.beta.threads.create.id threads_by_session[session_id] = thread_id end client.beta.threads.messages.create( thread_id, role: :user, content: content ) run = client.beta.threads.runs.create( thread_id, assistant_id: assistant_id ) while [:queued, :in_progress].include?(run.status) sleep(1) run = client.beta.threads.runs.retrieve(run.id, thread_id: thread_id) end messages = client.beta.threads.messages.list( thread_id, order: :desc, limit: 1 ) { content: messages.data&.first&.content } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )`\n\nResponses API\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50// Replace the illustrative IDs and URLs below with your own resource values. import express from \"express\"; import OpenAI from \"openai\"; const app = express(); const client = new OpenAI(); const conversationsBySession = new Map(); app.use(express.json()); app.post(\"/messages\", async (request, response) => { const { content, session_id: sessionId } = request.body ?? {}; if ( typeof content !== \"string\" || !content.trim() || typeof sessionId !== \"string\" || !sessionId.trim() ) { response.status(400).json({ error: \"content and session_id must be non-empty strings.\", }); return; } let conversationIdPromise = conversationsBySession.get(sessionId); if (!conversationIdPromise) { conversationIdPromise = client.conversations .create() .then((conversation) => conversation.id) .catch((error) => { conversationsBySession.delete(sessionId); throw error; }); conversationsBySession.set(sessionId, conversationIdPromise); } const conversationId = await conversationIdPromise; const promptId = \"pmpt_123\"; const result = await client.responses.create({ prompt: { id: promptId }, input: [{ role: \"user\", content }], conversation: conversationId, }); response.json({ content: result.output_text }); }); app.listen(Number(process.env.OPENAI_EXAMPLE_PORT ?? 8000), \"127.0.0.1\");\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19# Replace the illustrative IDs and URLs below with your own resource values. conversations_by_session: dict[str, str] = {} @app.post(\"/messages\") async def message(message: Message): conversation_id = conversations_by_session.get(message.session_id) if conversation_id is None: conversation_id = openai.conversations.create().id conversations_by_session[message.session_id] = conversation_id example_prompt_id = \"pmpt_123\" response = openai.responses.create( prompt={\"id\": example_prompt_id}, input=[{\"role\": \"user\", \"content\": message.content}], conversation=conversation_id, ) return {\"content\": response.output_text}\n```\n\n```\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32# Replace the illustrative IDs and URLs below with your own resource values. require \"openai\" client = OpenAI::Client.new conversations_by_session = {} handle_message = lambda do |session_id:, content:| conversation_id = conversations_by_session[session_id] unless conversation_id conversation_id = client.conversations.create.id conversations_by_session[session_id] = conversation_id end response = client.responses.create( prompt: { id: \"pmpt_123\" }, input: [ { role: :user, content: content } ], conversation: conversation_id ) { content: response.output_text } end puts( handle_message.call( session_id: \"example-session\", content: \"What are the five Ds of dodgeball?\" ) )\n```", "znaku_textu": 17534, "slov": 2354, "odkazu": 474, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/assistants", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:52:07", "sha256": "53f9f37febb4259ae4be52a7a71feffb70531c2e9814bd13d739f9ad6e049109", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://openai.com/policies", "https://openai.com/academy/", "https://academy.openai.com/home/events", "https://openai.com/news/", "https://github.com/openai/openai-cookbook", "https://openai.com/business/why-openai/startups/", "https://community.openai.com/", "https://discord.com/invite/openai", "https://www.reddit.com/r/OpenAI/", "https://x.com/OpenAIDevs"]} {"url": "https://developers.openai.com/api/docs/api-reference/moderations", "titulek": "Moderations | OpenAI API Reference", "h1": "Moderations", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/moderations/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Moderations", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/moderations/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nModeration object { categories, category_applied_input_types, category_scores, flagged } categories: object { harassment, \"harassment/threatening\", hate, 10 more } A list of the categories, and whether they are flagged or not.harassment: booleanContent that expresses, incites, or promotes harassing language towards any target.\"harassment/threatening\": booleanHarassment content that also includes violence or serious harm towards any target.hate: booleanContent that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.\"hate/threatening\": booleanHateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.illicit: boolean or nullContent that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, “how to shoplift” would fit this category.\"illicit/violent\": boolean or nullContent that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon.\"self-harm\": booleanContent that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.\"self-harm/instructions\": booleanContent that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.\"self-harm/intent\": booleanContent where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.sexual: booleanContent meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).\"sexual/minors\": booleanSexual content that includes an individual who is under 18 years old.violence: booleanContent that depicts death, violence, or physical injury.\"violence/graphic\": booleanContent that depicts death, violence, or physical injury in graphic detail.category_applied_input_types: object { harassment, \"harassment/threatening\", hate, 10 more } A list of the categories along with the input type(s) that the score applies to.harassment: array of \"text\"The applied input type(s) for the category ‘harassment’.\"harassment/threatening\": array of \"text\"The applied input type(s) for the category ‘harassment/threatening’.hate: array of \"text\"The applied input type(s) for the category ‘hate’.\"hate/threatening\": array of \"text\"The applied input type(s) for the category ‘hate/threatening’.illicit: array of \"text\"The applied input type(s) for the category ‘illicit’.\"illicit/violent\": array of \"text\"The applied input type(s) for the category ‘illicit/violent’.\"self-harm\": array of \"text\" or \"image\"The applied input type(s) for the category ‘self-harm’.One of the following:\"text\"\"image\"\"self-harm/instructions\": array of \"text\" or \"image\"The applied input type(s) for the category ‘self-harm/instructions’.One of the following:\"text\"\"image\"\"self-harm/intent\": array of \"text\" or \"image\"The applied input type(s) for the category ‘self-harm/intent’.One of the following:\"text\"\"image\"sexual: array of \"text\" or \"image\"The applied input type(s) for the category ‘sexual’.One of the following:\"text\"\"image\"\"sexual/minors\": array of \"text\"The applied input type(s) for the category ‘sexual/minors’.violence: array of \"text\" or \"image\"The applied input type(s) for the category ‘violence’.One of the following:\"text\"\"image\"\"violence/graphic\": array of \"text\" or \"image\"The applied input type(s) for the category ‘violence/graphic’.One of the following:\"text\"\"image\"category_scores: object { harassment, \"harassment/threatening\", hate, 10 more } A list of the categories along with their scores as predicted by model.harassment: numberThe score for the category ‘harassment’.\"harassment/threatening\": numberThe score for the category ‘harassment/threatening’.hate: numberThe score for the category ‘hate’.\"hate/threatening\": numberThe score for the category ‘hate/threatening’.illicit: numberThe score for the category ‘illicit’.\"illicit/violent\": numberThe score for the category ‘illicit/violent’.\"self-harm\": numberThe score for the category ‘self-harm’.\"self-harm/instructions\": numberThe score for the category ‘self-harm/instructions’.\"self-harm/intent\": numberThe score for the category ‘self-harm/intent’.sexual: numberThe score for the category ‘sexual’.\"sexual/minors\": numberThe score for the category ‘sexual/minors’.violence: numberThe score for the category ‘violence’.\"violence/graphic\": numberThe score for the category ‘violence/graphic’.flagged: booleanWhether any of the below categories are flagged.\n\nModerationCreateResponse object { id, model, results } Represents if a given text input is potentially harmful.id: stringThe unique identifier for the moderation request.model: stringThe model used to generate the moderation results.results: array of [Moderation](/api/reference/resources/moderations#(resource)%20moderations%20%3E%20(model)%20moderation%20%3E%20(schema)) { categories, category_applied_input_types, category_scores, flagged } A list of moderation objects.categories: object { harassment, \"harassment/threatening\", hate, 10 more } A list of the categories, and whether they are flagged or not.harassment: booleanContent that expresses, incites, or promotes harassing language towards any target.\"harassment/threatening\": booleanHarassment content that also includes violence or serious harm towards any target.hate: booleanContent that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.\"hate/threatening\": booleanHateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.illicit: boolean or nullContent that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, “how to shoplift” would fit this category.\"illicit/violent\": boolean or nullContent that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon.\"self-harm\": booleanContent that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.\"self-harm/instructions\": booleanContent that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.\"self-harm/intent\": booleanContent where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.sexual: booleanContent meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).\"sexual/minors\": booleanSexual content that includes an individual who is under 18 years old.violence: booleanContent that depicts death, violence, or physical injury.\"violence/graphic\": booleanContent that depicts death, violence, or physical injury in graphic detail.category_applied_input_types: object { harassment, \"harassment/threatening\", hate, 10 more } A list of the categories along with the input type(s) that the score applies to.harassment: array of \"text\"The applied input type(s) for the category ‘harassment’.\"harassment/threatening\": array of \"text\"The applied input type(s) for the category ‘harassment/threatening’.hate: array of \"text\"The applied input type(s) for the category ‘hate’.\"hate/threatening\": array of \"text\"The applied input type(s) for the category ‘hate/threatening’.illicit: array of \"text\"The applied input type(s) for the category ‘illicit’.\"illicit/violent\": array of \"text\"The applied input type(s) for the category ‘illicit/violent’.\"self-harm\": array of \"text\" or \"image\"The applied input type(s) for the category ‘self-harm’.One of the following:\"text\"\"image\"\"self-harm/instructions\": array of \"text\" or \"image\"The applied input type(s) for the category ‘self-harm/instructions’.One of the following:\"text\"\"image\"\"self-harm/intent\": array of \"text\" or \"image\"The applied input type(s) for the category ‘self-harm/intent’.One of the following:\"text\"\"image\"sexual: array of \"text\" or \"image\"The applied input type(s) for the category ‘sexual’.One of the following:\"text\"\"image\"\"sexual/minors\": array of \"text\"The applied input type(s) for the category ‘sexual/minors’.violence: array of \"text\" or \"image\"The applied input type(s) for the category ‘violence’.One of the following:\"text\"\"image\"\"violence/graphic\": array of \"text\" or \"image\"The applied input type(s) for the category ‘violence/graphic’.One of the following:\"text\"\"image\"category_scores: object { harassment, \"harassment/threatening\", hate, 10 more } A list of the categories along with their scores as predicted by model.harassment: numberThe score for the category ‘harassment’.\"harassment/threatening\": numberThe score for the category ‘harassment/threatening’.hate: numberThe score for the category ‘hate’.\"hate/threatening\": numberThe score for the category ‘hate/threatening’.illicit: numberThe score for the category ‘illicit’.\"illicit/violent\": numberThe score for the category ‘illicit/violent’.\"self-harm\": numberThe score for the category ‘self-harm’.\"self-harm/instructions\": numberThe score for the category ‘self-harm/instructions’.\"self-harm/intent\": numberThe score for the category ‘self-harm/intent’.sexual: numberThe score for the category ‘sexual’.\"sexual/minors\": numberThe score for the category ‘sexual/minors’.violence: numberThe score for the category ‘violence’.\"violence/graphic\": numberThe score for the category ‘violence/graphic’.flagged: booleanWhether any of the below categories are flagged.\n\nModerationModel = \"omni-moderation-latest\" or \"omni-moderation-2024-09-26\" or \"text-moderation-latest\" or \"text-moderation-stable\"One of the following:\"omni-moderation-latest\"\"omni-moderation-2024-09-26\"\"text-moderation-latest\"\"text-moderation-stable\"", "znaku_textu": 10663, "slov": 1285, "odkazu": 435, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:35", "sha256": "d4659783bc4aaa9b6a10ef6adbebc9c9fcde101895ed273286f2b27b70ca02e5", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 09:54:32", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-calls/accept-call", "titulek": "Accept call | OpenAI API Reference", "h1": "Accept call", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/accept/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Accept call", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/accept/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Realtime", "Calls"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 3, "text": "Accept call"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Accept an incoming SIP call and configure the realtime session that will\nhandle it.\n\n##### Path ParametersExpand Collapse\n\ncall_id : string\n\n##### Body ParametersJSONExpand Collapse\n\ntype : \"realtime\"\n\nThe type of session to create. Always `realtime` for the Realtime API.\n\naudio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\ninclude : optional array of \"item.input_audio_transcription.logprobs\"\n\nAdditional fields to include in server outputs.\n\n`item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\ninstructions : optional string\n\nThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\n\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.\n\nmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"\n\nmodel: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"\n\noutput_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"\n\nparallel_tool_calls : optional boolean\n\nWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.\n\nprompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).id: stringThe unique identifier of the prompt template to use.variables: optional map[string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image%20%3E%20(schema)) { detail, type, file_id, 2 more } or [ResponseInputFile](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file%20%3E%20(schema)) { type, detail, file_data, 4 more } ] or nullOptional 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.One of the following:stringResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImage object { detail, type, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).detail: [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema))The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"type: \"input_image\"The type of the input item. Always `input_image`.file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.formaturiprompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFile object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional stringThe content of the file to be sent to the model.file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional stringThe URL of the file to be sent to the model.formaturifilename: optional stringThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.version: optional string or nullOptional version of the prompt template.\n\nreasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\ntool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\ntools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\ntracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\ntruncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\n### Accept call\n\n```\ncurl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/accept \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"type\": \"realtime\", \"model\": \"gpt-realtime\", \"instructions\": \"You are Alex, a friendly concierge for Example Corp.\", }'\n```\n\n##### Returns Examples", "znaku_textu": 28688, "slov": 3823, "odkazu": 619, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:42", "sha256": "63f195e666f04ca44338a0ea746fb631226ec7436fb091bac930c47586abf51b", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://modelcontextprotocol.io/specification/2025-06-18/schema", "https://platform.openai.com/logs?api=traces"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-calls/hangup-call", "titulek": "Hang up call | OpenAI API Reference", "h1": "Hang up call", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/hangup/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Hang up call", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/hangup/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Realtime", "Calls"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 3, "text": "Hang up call"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "End an active Realtime API call, whether it was initiated over SIP or\nWebRTC.\n\n##### Path ParametersExpand Collapse\n\ncall_id : string\n\n### Hang up call\n\n```\ncurl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/hangup \\ -H \"Authorization: Bearer $OPENAI_API_KEY\"\n```\n\n##### Returns Examples", "znaku_textu": 275, "slov": 34, "odkazu": 372, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:46", "sha256": "4185a8f8a63f7f9729560be312ef0fc0d36b8e3702a6bfe76d7792309c1d9b5c", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-calls/refer-call", "titulek": "Refer call | OpenAI API Reference", "h1": "Refer call", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/refer/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Refer call", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/refer/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Realtime", "Calls"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 3, "text": "Refer call"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Transfer an active SIP call to a new destination using the SIP REFER verb.\n\n##### Path ParametersExpand Collapse\n\ncall_id : string\n\n##### Body ParametersJSONExpand Collapse\n\ntarget_uri : string\n\nURI that should appear in the SIP Refer-To header. Supports values like\n`tel:+14155550123` or `sip:agent@example.com`.\n\n### Refer call\n\n```\ncurl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/refer \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{\"target_uri\": \"tel:+14155550123\"}'\n```\n\n##### Returns Examples", "znaku_textu": 520, "slov": 65, "odkazu": 373, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:45", "sha256": "9c3a26cede5c11b2abe0b564430e9bc031f7407c4aacc26bb354c37e0dd191ca", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-calls/reject-call", "titulek": "Reject call | OpenAI API Reference", "h1": "Reject call", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/reject/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Reject call", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/reject/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Realtime", "Calls"], "osnova": [{"uroven": 5, "text": "Path ParametersExpand Collapse"}, {"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 3, "text": "Reject call"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Decline an incoming SIP call by returning a SIP status code to the caller.\n\n##### Path ParametersExpand Collapse\n\ncall_id : string\n\n##### Body ParametersJSONExpand Collapse\n\nstatus_code : optional number\n\nSIP response code to send back to the caller. Defaults to `603` (Decline)\nwhen omitted.\n\n### Reject call\n\n```\ncurl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/reject \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{\"status_code\": 486}'\n```\n\n##### Returns Examples", "znaku_textu": 487, "slov": 64, "odkazu": 373, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 13:26:44", "sha256": "16d49df0ad56f85ef5b9875d29ec1c77d5aff17454c2972b439ab777c1d9e8d4", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/conversation/item/create", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:43:23", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/conversation/item/truncate", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:34:28", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/input_audio_buffer/append", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:38:57", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/input_audio_buffer/clear", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:39:30", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/input_audio_buffer/commit", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:39:12", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/output_audio_buffer/clear", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:34:46", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/response/cancel", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:34:37", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/response/create", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:43:32", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-client-events/session/update", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:43:04", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/conversation/item/added", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:44:00", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/conversation/item/done", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:44:12", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/error", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:34:18", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/input_audio_buffer/committed", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:39:21", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/input_audio_buffer/speech_started", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:38:30", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/input_audio_buffer/speech_stopped", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:38:39", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/mcp_list_tools/completed", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:34:56", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/mcp_list_tools/failed", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:35:18", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/rate_limits/updated", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:40:24", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/content_part/added", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:44:39", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/content_part/done", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:38:13", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/created", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:44:21", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/done", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:43:41", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/function_call_arguments/delta", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:40:49", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/mcp_call/failed", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:35:45", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_audio/delta", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:39:39", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_audio/done", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:39:48", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_audio_transcript/delta", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:38:48", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_audio_transcript/done", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:39:57", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_item/added", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:44:30", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_item/done", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:38:21", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_text/delta", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:43:51", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/response/output_text/done", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 11:37:57", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/session/created", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:42:50", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-server-events/session/updated", "titulek": "Realtime | OpenAI API Reference", "h1": "Realtime", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Realtime", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}, {"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nAudioTranscription object { delay, keywords, language, 3 more } delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n\nConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.\n\nConversationItem = [RealtimeConversationItemSystemMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_system_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemUserMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_user_message%20%3E%20(schema)) { content, role, type, 3 more } or [RealtimeConversationItemAssistantMessage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_conversation_item_assistant_message%20%3E%20(schema)) { content, role, type, 3 more } or 6 moreA single item within a Realtime conversation.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.\n\nConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.\n\nConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.\n\nConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.\n\nConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n\nConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.\n\nConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.\n\nConversationItemWithReference object { id, arguments, call_id, 7 more } The item to add to the conversation.id: optional stringFor an item of type (`message` | `function_call` | `function_call_output`)\nthis field allows the client to assign the unique ID of the item. It is\nnot required because the server will generate one if not provided. For an item of type `item_reference`, this field is required and is a\nreference to any item that has previously existed in the conversation.arguments: optional stringThe arguments of the function call (for `function_call` items).call_id: optional stringThe ID of the function call (for `function_call` and\n`function_call_output` items). If passed on a `function_call_output`\nitem, the server will check that a `function_call` item with the same\nID exists in the conversation history.content: optional array of object { id, audio, text, 2 more } The content of the message, applicable for `message` items. Message items of role `system` support only `input_text` content Message items of role `user` support `input_text` and `input_audio`\ncontent Message items of role `assistant` support `text` content. id: optional stringID of a previous conversation item to reference (for `item_reference`\ncontent types in `response.create` events). These can reference both\nclient and server created items.audio: optional stringBase64-encoded audio bytes, used for `input_audio` content type.text: optional stringThe text content, used for `input_text` and `text` content types.transcript: optional stringThe transcript of the audio, used for `input_audio` content type.type: optional \"input_audio\" or \"input_text\" or \"item_reference\" or \"text\"The content type (`input_text`, `input_audio`, `item_reference`, `text`).One of the following:\"input_audio\"\"input_text\"\"item_reference\"\"text\"name: optional stringThe name of the function being called (for `function_call` items).object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`.output: optional stringThe output of the function call (for `function_call_output` items).role: optional \"user\" or \"assistant\" or \"system\"The role of the message sender (`user`, `assistant`, `system`), only\napplicable for `message` items.One of the following:\"user\"\"assistant\"\"system\"status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\non the conversation, but are accepted for consistency with the\n`conversation.item.created` event.One of the following:\"completed\"\"incomplete\"\"in_progress\"type: optional \"message\" or \"function_call\" or \"function_call_output\"The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).One of the following:\"message\"\"function_call\"\"function_call_output\"\n\nInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.\n\nInputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nInputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.\n\nInputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.\n\nInputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.\n\nInputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.\n\nInputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.\n\nLogProbProperties object { token, bytes, logprob } A log probability object.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.\n\nMcpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.\n\nMcpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.\n\nMcpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.\n\nNoiseReductionType = \"near_field\" or \"far_field\"Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"\n\nOutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.\n\nRateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.\n\nRealtimeAudioConfig object { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice }\n\nRealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeAudioConfigOutput object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeAudioFormats = object { rate, type } or object { type } or object { type } The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.\n\nRealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeClientEvent = [ConversationItemCreateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_create_event%20%3E%20(schema)) { item, type, event_id, previous_item_id } or [ConversationItemDeleteEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_delete_event%20%3E%20(schema)) { item_id, type, event_id } or [ConversationItemRetrieveEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_retrieve_event%20%3E%20(schema)) { item_id, type, event_id } or 8 moreA realtime client event.One of the following:ConversationItemCreateEvent object { item, type, event_id, previous_item_id } Add a new Item to the Conversation’s context, including messages, function\ncalls, and function call responses. This event can be used both to populate a\n“history” of the conversation and to add new items mid-stream, but has the\ncurrent limitation that it cannot populate assistant audio messages. If successful, the server will respond with a `conversation.item.created`\nevent, otherwise an `error` event will be sent.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.create\"The event type, must be `conversation.item.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512previous_item_id: optional stringThe ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.ConversationItemDeleteEvent object { item_id, type, event_id } Send this event when you want to remove any item from the conversation\nhistory. The server will respond with a `conversation.item.deleted` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to delete.type: \"conversation.item.delete\"The event type, must be `conversation.item.delete`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemRetrieveEvent object { item_id, type, event_id } Send this event when you want to retrieve the server’s representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\nThe server will respond with a `conversation.item.retrieved` event,\nunless the item does not exist in the conversation history, in which case the\nserver will respond with an error.item_id: stringThe ID of the item to retrieve.type: \"conversation.item.retrieve\"The event type, must be `conversation.item.retrieve`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more } Send this event to truncate a previous assistant message’s audio. The server\nwill produce audio faster than realtime, so this event is useful when the user\ninterrupts to truncate audio that has already been sent to the client but not\nyet played. This will synchronize the server’s understanding of the audio with\nthe client’s playback. Truncating audio will delete the server-side text transcript to ensure there\nis not text in the context that hasn’t been heard by the user. If successful, the server will respond with a `conversation.item.truncated`\nevent.audio_end_ms: numberInclusive duration up to which audio is truncated, in milliseconds. If\nthe audio_end_ms is greater than the actual audio duration, the server\nwill respond with an error.content_index: numberThe index of the content part to truncate. Set this to `0`.item_id: stringThe ID of the assistant message item to truncate. Only assistant message\nitems can be truncated.type: \"conversation.item.truncate\"The event type, must be `conversation.item.truncate`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the input audio buffer. The audio\nbuffer is temporary storage you can write to and later commit. A “commit” will create a new\nuser message item in the conversation history from the buffer content and clear the buffer.\nInput audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide\nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum\nof 15 MiB, for example streaming smaller chunks from the client may allow the\nVAD to be more responsive. Unlike most other client events, the server will\nnot send a confirmation response to this event.audio: stringBase64-encoded audio bytes. This must be in the format specified by the\n`input_audio_format` field in the session configuration.type: \"input_audio_buffer.append\"The event type, must be `input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512InputAudioBufferClearEvent object { type, event_id } Send this event to clear the audio bytes in the buffer. The server will\nrespond with an `input_audio_buffer.cleared` event.type: \"input_audio_buffer.clear\"The event type, must be `input_audio_buffer.clear`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512OutputAudioBufferClearEvent object { type, event_id } **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to\nstop generating audio and emit a `output_audio_buffer.cleared` event. This\nevent should be preceded by a `response.cancel` client event to stop the\ngeneration of the current response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).type: \"output_audio_buffer.clear\"The event type, must be `output_audio_buffer.clear`.event_id: optional stringThe unique ID of the client event used for error handling.InputAudioBufferCommitEvent object { type, event_id } Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.type: \"input_audio_buffer.commit\"The event type, must be `input_audio_buffer.commit`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512ResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.ResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parametersSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nRealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"\n\nRealtimeError object { message, type, code, 2 more } Details of the error.message: stringA human-readable error message.type: stringThe type of error (e.g., “invalid_request_error”, “server_error”).code: optional string or nullError code, if any.event_id: optional string or nullThe event_id of the client event that caused the error, if applicable.param: optional string or nullParameter related to the error, if any.\n\nRealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.\n\nRealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.\n\nRealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.\n\nRealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.\n\nRealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.\n\nRealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"\n\nRealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.\n\nRealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"\n\nRealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"\n\nRealtimeReasoning object { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n\nRealtimeReasoningEffort = \"minimal\" or \"low\" or \"medium\" or 2 moreConstrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"\n\nRealtimeResponse object { id, audio, conversation_id, 8 more } The response resource.id: optional stringThe unique ID of the response, will look like `resp_1234`.audio: optional object { output } Configuration for audio output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"conversation_id: optional stringWhich conversation the response is added to, determined by the `conversation`\nfield in the `response.create` event. If `auto`, the response will be added to\nthe default conversation and the value of `conversation_id` will be an id like\n`conv_1234`. If `none`, the response will not be added to any conversation and\nthe value of `conversation_id` will be `null`. If responses are being triggered\nautomatically by VAD the response will be added to the default conversationmax_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls, that was used in this response.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.object: optional \"realtime.response\"The object type, must be `realtime.response`.output: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))The list of output items generated by the response.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"status: optional \"completed\" or \"cancelled\" or \"failed\" or 2 moreThe final status of the response (`completed`, `cancelled`, `failed`, or\n`incomplete`, `in_progress`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\"in_progress\"status_details: optional [RealtimeResponseStatus](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_status%20%3E%20(schema)) { error, reason, type } Additional details about the status.usage: optional [RealtimeResponseUsage](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage%20%3E%20(schema)) { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.\n\nRealtimeResponseCreateAudioOutput object { output } Configuration for audio input and output.output: optional object { format, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.\n\nRealtimeResponseCreateParams object { audio, conversation, input, 9 more } Create a new Realtime response with these parametersaudio: optional [RealtimeResponseCreateAudioOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_audio_output%20%3E%20(schema)) { output } Configuration for audio input and output.conversation: optional string or \"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:string\"auto\" or \"none\"Controls which conversation the response is added to. Currently supports\n`auto` and `none`, with `auto` as the default value. The `auto` value\nmeans that the contents of the response will be added to the default\nconversation. Set this to `none` to create an out-of-band response which\nwill not add items to default conversation.One of the following:\"auto\"\"none\"input: optional array of [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))Input items to include in the prompt for the model. Using this field\ncreates a new context for this Response instead of using the default\nconversation. An empty array `[]` will clear the context for this Response.\nNote that this can include references to items that previously appeared in the session\nusing their id.One of the following:RealtimeConversationItemSystemMessage object { content, role, type, 3 more } A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation’s behavior, use instructions, but for smaller updates (e.g. “the user is now asking about a different topic”), use system messages.content: array of object { text, type } The content of the message.text: optional stringThe text content.type: optional \"input_text\"The content type. Always `input_text` for system messages.role: \"system\"The role of the message sender. Always `system`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemUserMessage object { content, role, type, 3 more } A user message item in a Realtime conversation.content: array of object { audio, detail, image_url, 3 more } The content of the message.audio: optional stringBase64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the image (for `input_image`). `auto` will default to `high`.One of the following:\"auto\"\"low\"\"high\"image_url: optional stringBase64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.formaturitext: optional stringThe text content (for `input_text`).transcript: optional stringTranscript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.type: optional \"input_text\" or \"input_audio\" or \"input_image\"The content type (`input_text`, `input_audio`, or `input_image`).One of the following:\"input_text\"\"input_audio\"\"input_image\"role: \"user\"The role of the message sender. Always `user`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemAssistantMessage object { content, role, type, 3 more } An assistant message item in a Realtime conversation.content: array of object { audio, text, transcript, type } The content of the message.audio: optional stringBase64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.text: optional stringThe text content.transcript: optional stringThe transcript of the audio content, this will always be present if the output type is `audio`.type: optional \"output_text\" or \"output_audio\"The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.One of the following:\"output_text\"\"output_audio\"role: \"assistant\"The role of the message sender. Always `assistant`.type: \"message\"The type of the item. Always `message`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more } A function call item in a Realtime conversation.arguments: stringThe arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`.name: stringThe name of the function being called.type: \"function_call\"The type of the item. Always `function_call`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.call_id: optional stringThe ID of the function call.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more } A function call output item in a Realtime conversation.call_id: stringThe ID of the function call this output is for.output: stringThe output of the function call, this is free text and can contain any information or simply be empty.type: \"function_call_output\"The type of the item. Always `function_call_output`.id: optional stringThe unique ID of the item. This may be provided by the client or generated by the server.object: optional \"realtime.item\"Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.status: optional \"completed\" or \"incomplete\" or \"in_progress\"The status of the item. Has no effect on the conversation.One of the following:\"completed\"\"incomplete\"\"in_progress\"RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more } A Realtime item responding to an MCP approval request.id: stringThe unique ID of the approval response.approval_request_id: stringThe ID of the approval request being answered.approve: booleanWhether the request was approved.type: \"mcp_approval_response\"The type of the item. Always `mcp_approval_response`.reason: optional string or nullOptional reason for the decision.RealtimeMcpListTools object { server_label, tools, type, id } A Realtime item listing tools available on an MCP server.server_label: stringThe label of the MCP server.tools: array of object { input_schema, name, annotations, description } The tools available on the server.input_schema: unknownThe JSON schema describing the tool’s input.name: stringThe name of the tool.annotations: optional unknown or nullAdditional annotations about the tool.description: optional string or nullThe description of the tool.type: \"mcp_list_tools\"The type of the item. Always `mcp_list_tools`.id: optional stringThe unique ID of the list.RealtimeMcpToolCall object { id, arguments, name, 5 more } A Realtime item representing an invocation of a tool on an MCP server.id: stringThe unique ID of the tool call.arguments: stringA JSON string of the arguments passed to the tool.name: stringThe name of the tool that was run.server_label: stringThe label of the MCP server running the tool.type: \"mcp_call\"The type of the item. Always `mcp_call`.approval_request_id: optional string or nullThe ID of an associated approval request, if any.error: optional [RealtimeMcpProtocolError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_protocol_error%20%3E%20(schema)) { code, message, type } or [RealtimeMcpToolExecutionError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcp_tool_execution_error%20%3E%20(schema)) { message, type } or [RealtimeMcphttpError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_mcphttp_error%20%3E%20(schema)) { code, message, type } or nullThe error from the tool call, if any.One of the following:RealtimeMcpProtocolError object { code, message, type } code: numbermessage: stringtype: \"protocol_error\"RealtimeMcpToolExecutionError object { message, type } message: stringtype: \"tool_execution_error\"RealtimeMcphttpError object { code, message, type } code: numbermessage: stringtype: \"http_error\"output: optional string or nullThe output from the tool call.RealtimeMcpApprovalRequest object { id, arguments, name, 2 more } A Realtime item requesting human approval of a tool invocation.id: stringThe unique ID of the approval request.arguments: stringA JSON string of arguments for the tool.name: stringThe name of the tool to run.server_label: stringThe label of the MCP server making the request.type: \"mcp_approval_request\"The type of the item. Always `mcp_approval_request`.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model used to respond, currently the only possible values are\n`[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the\noutput to mode `text` will disable audio output from the model.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeResponseStatus object { error, reason, type } Additional details about the status.error: optional object { code, type } A description of the error that caused the response to fail,\npopulated when the `status` is `failed`.code: optional stringError code, if any.type: optional stringThe type of error.reason: optional \"turn_detected\" or \"client_cancelled\" or \"max_output_tokens\" or \"content_filter\"The reason the Response did not complete. For a `cancelled` Response, one of `turn_detected` (the server VAD detected a new start of speech) or `client_cancelled` (the client sent a cancel event). For an `incomplete` Response, one of `max_output_tokens` or `content_filter` (the server-side safety filter activated and cut off the response).One of the following:\"turn_detected\"\"client_cancelled\"\"max_output_tokens\"\"content_filter\"type: optional \"completed\" or \"cancelled\" or \"failed\" or \"incomplete\"The type of error that caused the response to fail, corresponding\nwith the `status` field (`completed`, `cancelled`, `incomplete`,\n`failed`).One of the following:\"completed\"\"cancelled\"\"failed\"\"incomplete\"\n\nRealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more } Usage statistics for the Response, this will correspond to billing. A\nRealtime API session will maintain a conversation context and append new\nItems to the Conversation, thus output from previous turns (text and\naudio tokens) will become the input for later turns.input_token_details: optional [RealtimeResponseUsageInputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_input_token_details%20%3E%20(schema)) { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.input_tokens: optional numberThe number of input tokens used in the Response, including text and\naudio tokens.output_token_details: optional [RealtimeResponseUsageOutputTokenDetails](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_usage_output_token_details%20%3E%20(schema)) { audio_tokens, text_tokens } Details about the output tokens used in the Response.output_tokens: optional numberThe number of output tokens sent in the Response, including text and\naudio tokens.total_tokens: optional numberThe total number of tokens in the Response including input and output\ntext and audio tokens.\n\nRealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more } Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.audio_tokens: optional numberThe number of audio tokens used as input for the Response.cached_tokens: optional numberThe number of cached tokens used as input for the Response.cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens } Details about the cached tokens used as input for the Response.audio_tokens: optional numberThe number of cached audio tokens used as input for the Response.image_tokens: optional numberThe number of cached image tokens used as input for the Response.text_tokens: optional numberThe number of cached text tokens used as input for the Response.image_tokens: optional numberThe number of image tokens used as input for the Response.text_tokens: optional numberThe number of text tokens used as input for the Response.\n\nRealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens } Details about the output tokens used in the Response.audio_tokens: optional numberThe number of audio tokens used in the Response.text_tokens: optional numberThe number of text tokens used in the Response.\n\nRealtimeServerEvent = [ConversationCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_created_event%20%3E%20(schema)) { conversation, event_id, type } or [ConversationItemCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_created_event%20%3E%20(schema)) { event_id, item, type, previous_item_id } or [ConversationItemDeletedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item_deleted_event%20%3E%20(schema)) { event_id, item_id, type } or 43 moreA realtime server event.One of the following:ConversationCreatedEvent object { conversation, event_id, type } Returned when a conversation is created. Emitted right after session creation.conversation: object { id, object } The conversation resource.id: optional stringThe unique ID of the conversation.object: optional stringThe object type, must be `realtime.conversation`.event_id: stringThe unique ID of the server event.type: \"conversation.created\"The event type, must be `conversation.created`.ConversationItemCreatedEvent object { event_id, item, type, previous_item_id } Returned when a conversation item is created. There are several scenarios that produce this event: The server is generating a Response, which if successful will produce\neither one or two Items, which will be of type `message`\n(role `assistant`) or type `function_call`. The input audio buffer has been committed, either by the client or the\nserver (in `server_vad` mode). The server will take the content of the\ninput audio buffer and add it to a new user message Item. The client has sent a `conversation.item.create` event to add a new Item\nto the Conversation. event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.created\"The event type, must be `conversation.item.created`.previous_item_id: optional string or nullThe ID of the preceding item in the Conversation context, allows the\nclient to understand the order of the conversation. Can be `null` if the\nitem has no predecessor.ConversationItemDeletedEvent object { event_id, item_id, type } Returned when an item in the conversation is deleted by the client with a\n`conversation.item.delete` event. This event is used to synchronize the\nserver’s understanding of the conversation history with the client’s view.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item that was deleted.type: \"conversation.item.deleted\"The event type, must be `conversation.item.deleted`.ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more } This event is the output of audio transcription for user audio written to the\nuser audio buffer. Transcription begins when the input audio buffer is\ncommitted by the client or server (when VAD is enabled). Transcription runs\nasynchronously with Response creation, so this event may come before or after\nthe Response events. Realtime API models accept audio natively, and thus input transcription is a\nseparate process run on a separate ASR (Automatic Speech Recognition) model.\nThe transcript may diverge somewhat from the model’s interpretation, and\nshould be treated as a rough guide.content_index: numberThe index of the content part containing the audio.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.transcript: stringThe transcribed text.type: \"conversation.item.input_audio_transcription.completed\"The event type, must be\n`conversation.item.input_audio_transcription.completed`.usage: object { input_tokens, output_tokens, total_tokens, 2 more } or object { seconds, type } Usage statistics for the transcription, this is billed according to the ASR model’s pricing rather than the realtime model’s pricing.One of the following:Tokens object { input_tokens, output_tokens, total_tokens, 2 more } Usage statistics for models billed by token usage.input_tokens: numberNumber of input tokens billed for this request.output_tokens: numberNumber of output tokens generated.total_tokens: numberTotal number of tokens used (input + output).type: \"tokens\"The type of the usage object. Always `tokens` for this variant.input_token_details: optional object { audio_tokens, text_tokens } Details about the input tokens billed for this request.audio_tokens: optional numberNumber of audio tokens billed for this request.text_tokens: optional numberNumber of text tokens billed for this request.Duration object { seconds, type } Usage statistics for models billed by audio input duration.seconds: numberDuration of the input audio in seconds.formatdoubletype: \"duration\"The type of the usage object. Always `duration` for this variant.languages: optional array of [TranscriptionLanguage](/api/reference/resources/audio#(resource)%20audio.transcriptions%20%3E%20(model)%20transcription_language%20%3E%20(schema)) { code } The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.code: stringThe code of a language detected in the audio.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more } Returned when the text value of an input audio transcription content part is updated with incremental transcription results.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the audio that is being transcribed.type: \"conversation.item.input_audio_transcription.delta\"The event type, must be `conversation.item.input_audio_transcription.delta`.content_index: optional numberThe index of the content part in the item’s content array.delta: optional stringThe text delta.logprobs: optional array of [LogProbProperties](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20log_prob_properties%20%3E%20(schema)) { token, bytes, logprob } or nullThe log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.token: stringThe token that was used to generate the log probability.bytes: array of numberThe bytes that were used to generate the log probability.logprob: numberThe log probability of the token.ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more } Returned when input audio transcription is configured, and a transcription\nrequest for a user message failed. These events are separate from other\n`error` events so that the client can identify the related Item.content_index: numberThe index of the content part containing the audio.error: object { code, message, param, type } Details of the transcription error.code: optional stringError code, if any.message: optional stringA human-readable error message.param: optional stringParameter related to the error, if any.type: optional stringThe type of error.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item.type: \"conversation.item.input_audio_transcription.failed\"The event type, must be\n`conversation.item.input_audio_transcription.failed`.ConversationItemRetrieved object { event_id, item, type } Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server’s representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.retrieved\"The event type, must be `conversation.item.retrieved`.ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more } Returned when an earlier assistant audio message item is truncated by the\nclient with a `conversation.item.truncate` event. This event is used to\nsynchronize the server’s understanding of the audio with the client’s playback. This action will truncate the audio and remove the server-side text transcript\nto ensure there is no text in the context that hasn’t been heard by the user.audio_end_ms: numberThe duration up to which the audio was truncated, in milliseconds.content_index: numberThe index of the content part that was truncated.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the assistant message item that was truncated.type: \"conversation.item.truncated\"The event type, must be `conversation.item.truncated`.RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.InputAudioBufferClearedEvent object { event_id, type } Returned when the input audio buffer is cleared by the client with a\n`input_audio_buffer.clear` event.event_id: stringThe unique ID of the server event.type: \"input_audio_buffer.cleared\"The event type, must be `input_audio_buffer.cleared`.InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id } Returned when an input audio buffer is committed, either by the client or\nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event\nwill also be sent to the client.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.committed\"The event type, must be `input_audio_buffer.committed`.previous_item_id: optional string or nullThe ID of the preceding item after which the new item will be inserted.\nCan be `null` if the item has no predecessor.InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type } **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that\nrepresents a telephone keypad press (0–9, *, #, A–D). The `event` property\nis the keypad that the user press. The `received_at` is the UTC Unix Timestamp\nthat the server received the event.event: stringThe telephone keypad that was pressed by the user.received_at: numberUTC Unix Timestamp when DTMF Event was received by server.type: \"input_audio_buffer.dtmf_event_received\"The event type, must be `input_audio_buffer.dtmf_event_received`.InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type } Sent by the server when in `server_vad` mode to indicate that speech has been\ndetected in the audio buffer. This can happen any time audio is added to the\nbuffer (unless speech is already detected). The client may want to use this\nevent to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event\nwhen speech stops. The `item_id` property is the ID of the user message item\nthat will be created when speech stops and will also be included in the\n`input_audio_buffer.speech_stopped` event (unless the client manually commits\nthe audio buffer during VAD activation).audio_start_ms: numberMilliseconds from the start of all audio written to the buffer during the\nsession when speech was first detected. This will correspond to the\nbeginning of audio sent to the model, and thus includes the\n`prefix_padding_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created when speech stops.type: \"input_audio_buffer.speech_started\"The event type, must be `input_audio_buffer.speech_started`.InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type } Returned in `server_vad` mode when the server detects the end of speech in\nthe audio buffer. The server will also send an `conversation.item.created`\nevent with the user message item that is created from the audio buffer.audio_end_ms: numberMilliseconds since the session started when speech stopped. This will\ncorrespond to the end of audio sent to the model, and thus includes the\n`min_silence_duration_ms` configured in the Session.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the user message item that will be created.type: \"input_audio_buffer.speech_stopped\"The event type, must be `input_audio_buffer.speech_stopped`.RateLimitsUpdatedEvent object { event_id, rate_limits, type } Emitted at the beginning of a Response to indicate the updated rate limits.\nWhen a Response is created some tokens will be “reserved” for the output\ntokens, the rate limits shown here reflect that reservation, which is then\nadjusted accordingly once the Response is completed.event_id: stringThe unique ID of the server event.rate_limits: array of object { limit, name, remaining, reset_seconds } List of rate limit information.limit: optional numberThe maximum allowed value for the rate limit.name: optional \"requests\" or \"tokens\"The name of the rate limit (`requests`, `tokens`).One of the following:\"requests\"\"tokens\"remaining: optional numberThe remaining value before the limit is reached.reset_seconds: optional numberSeconds until the rate limit resets.type: \"rate_limits.updated\"The event type, must be `rate_limits.updated`.ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.ResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.ResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.SessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.SessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad SemanticVad output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:stringOne of the following:expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following:server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.: optional One of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.OutputAudioBufferStarted object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is\nemitted after an audio content part has been added (`response.content_part.added`)\nto the response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.started\"The event type, must be `output_audio_buffer.started`.OutputAudioBufferStopped object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,\nand no more audio is forthcoming. This event is emitted after the full response\ndata has been sent to the client (`response.done`).\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.stopped\"The event type, must be `output_audio_buffer.stopped`.OutputAudioBufferCleared object { event_id, response_id, type } **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\nmode when the user has interrupted (`input_audio_buffer.speech_started`),\nor when the client has emitted the `output_audio_buffer.clear` event to manually\ncut off the current audio response.\n[Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).event_id: stringThe unique ID of the server event.response_id: stringThe unique ID of the response that produced the audio.type: \"output_audio_buffer.cleared\"The event type, must be `output_audio_buffer.cleared`.ConversationItemAdded object { event_id, item, type, previous_item_id } Sent by the server when an Item is added to the default Conversation. This can happen in several cases: When the client sends a `conversation.item.create` event. When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.added\"The event type, must be `conversation.item.added`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.ConversationItemDone object { event_id, item, type, previous_item_id } Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.type: \"conversation.item.done\"The event type, must be `conversation.item.done`.previous_item_id: optional string or nullThe ID of the item that precedes this one, if any. This is used to\nmaintain ordering when items are inserted.InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more } Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured\nwith `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that\nthere hasn’t been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last\nmodel response up to the triggering time, as an offset from the beginning of audio written\nto the input audio buffer. This means it demarcates the segment of audio that was silent and\nthe difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a\n`input_audio_buffer.committed` event) and a model response will be generated. There may be speech\nthat didn’t trigger VAD but is still detected by the model, so the model may respond with\nsomething relevant to the conversation or a prompt to continue speaking.audio_end_ms: numberMillisecond offset of audio written to the input audio buffer at the time the timeout was triggered.audio_start_ms: numberMillisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item associated with this segment.type: \"input_audio_buffer.timeout_triggered\"The event type, must be `input_audio_buffer.timeout_triggered`.ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more } Returned when an input audio transcription segment is identified for an item.id: stringThe segment identifier.content_index: numberThe index of the input audio content part within the item.end: numberEnd time of the segment in seconds.formatdoubleevent_id: stringThe unique ID of the server event.item_id: stringThe ID of the item containing the input audio content.speaker: stringThe detected speaker label for this segment.start: numberStart time of the segment in seconds.formatdoubletext: stringThe text for this segment.type: \"conversation.item.input_audio_transcription.segment\"The event type, must be `conversation.item.input_audio_transcription.segment`.McpListToolsInProgress object { event_id, item_id, type } Returned when listing MCP tools is in progress for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.in_progress\"The event type, must be `mcp_list_tools.in_progress`.McpListToolsCompleted object { event_id, item_id, type } Returned when listing MCP tools has completed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.completed\"The event type, must be `mcp_list_tools.completed`.McpListToolsFailed object { event_id, item_id, type } Returned when listing MCP tools has failed for an item.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP list tools item.type: \"mcp_list_tools.failed\"The event type, must be `mcp_list_tools.failed`.ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.ResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.ResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.ResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nRealtimeSession object { id, expires_at, include, 17 more } Realtime session object for the beta interface.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\" or nullAdditional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional object { language, languages, model, prompt } or nullConfiguration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not\nguaranteed to be followed by the model, but they provide guidance to the\nmodel on the desired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_response_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2025-08-28\" or 13 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"object: optional \"realtime.session\"The object type. Always `realtime.session`.output_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, output audio is sampled at a rate of 24kHz.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).speed: optional numberThe speed of the model’s spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.minimum0.25maximum1.5temperature: optional numberSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullConfiguration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, and `verse`.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"\n\nRealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeToolChoiceConfig = [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.\n\nRealtimeToolsConfig = array of [RealtimeToolsConfigUnion](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config_union%20%3E%20(schema))Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeToolsConfigUnion = [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n\nRealtimeTracingConfig = \"auto\" or object { group_id, metadata, workflow_name } Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n\nRealtimeTranscriptionSessionAudio object { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection }\n\nRealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n\nRealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n\nRealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranslationClientEvent = [RealtimeTranslationSessionUpdateEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_event%20%3E%20(schema)) { session, type, event_id } or [RealtimeTranslationInputAudioBufferAppendEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_input_audio_buffer_append_event%20%3E%20(schema)) { audio, type, event_id } or [RealtimeTranslationSessionCloseEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_close_event%20%3E%20(schema)) { type, event_id } A Realtime translation client event.One of the following:RealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512RealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationClientSecretCreateRequest object { session, expires_after } Create a translation session and client secret for the Realtime API.session: [RealtimeTranslationSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_create_request%20%3E%20(schema)) { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.expires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nRealtimeTranslationClientSecretCreateResponse object { expires_at, session, value } Response from creating a translation session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.value: stringThe generated client secret value.\n\nRealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id } Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono\nlittle-endian raw audio bytes. Unsupported websocket audio formats return a\nvalidation error because lower-quality audio materially degrades translation\nquality. Translation consumes 200 ms engine frames. For best realtime behavior, append\naudio in 200 ms chunks. If a chunk is shorter, the server buffers it until it\nhas enough audio for one frame. If a chunk is longer, the server splits it into\n200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending\naudio and later resumes, model time treats the resumed audio as contiguous with\nthe previous audio rather than as a real-world pause.audio: stringBase64-encoded 24 kHz PCM16 mono audio bytes.type: \"session.input_audio_buffer.append\"The event type, must be `session.input_audio_buffer.append`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n\nRealtimeTranslationServerEvent = [RealtimeErrorEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error_event%20%3E%20(schema)) { error, event_id, type } or [RealtimeTranslationSessionCreatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_created_event%20%3E%20(schema)) { event_id, session, type } or [RealtimeTranslationSessionUpdatedEvent](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_updated_event%20%3E%20(schema)) { event_id, session, type } or 4 moreA Realtime translation server event.One of the following:RealtimeErrorEvent object { error, event_id, type } Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.error: [RealtimeError](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_error%20%3E%20(schema)) { message, type, code, 2 more } Details of the error.event_id: stringThe unique ID of the server event.type: \"error\"The event type, must be `error`.RealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.RealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.RealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only source-language transcript text.event_id: stringThe unique ID of the server event.type: \"session.input_transcript.delta\"The event type, must be `session.input_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms } Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.delta: stringAppend-only transcript text for the translated output audio.event_id: stringThe unique ID of the server event.type: \"session.output_transcript.delta\"The event type, must be `session.output_transcript.delta`.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more } Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.delta: stringBase64-encoded translated audio data.event_id: stringThe unique ID of the server event.type: \"session.output_audio.delta\"The event type, must be `session.output_audio.delta`.channels: optional numberNumber of audio channels.elapsed_ms: optional number or nullTiming metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.format: optional \"pcm16\"Audio encoding for `delta`.sample_rate: optional numberSample rate of the audio delta.\n\nRealtimeTranslationSession object { id, audio, expires_at, 2 more } A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model used for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.expires_at: numberExpiration timestamp for the session, in seconds since epoch.formatunixtimemodel: stringThe Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.type: \"translation\"The session type. Always `translation` for Realtime translation sessions.\n\nRealtimeTranslationSessionCloseEvent object { type, event_id } Gracefully close the realtime translation session. The server flushes pending\ninput audio and emits any remaining translated output before closing the\nsession.type: \"session.close\"The event type, must be `session.close`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionClosedEvent object { event_id, type } Returned when a realtime translation session is closed.event_id: stringThe unique ID of the server event.type: \"session.closed\"The event type, must be `session.closed`.\n\nRealtimeTranslationSessionCreateRequest object { model, audio } Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.model: stringThe Realtime translation model used for this session.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionCreatedEvent object { event_id, session, type } Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.created\"The event type, must be `session.created`.\n\nRealtimeTranslationSessionUpdateEvent object { session, type, event_id } Send this event to update the translation session configuration. Translation\nsessions support updates to `audio.output.language`, `audio.input.transcription`,\nand `audio.input.noise_reduction`.session: [RealtimeTranslationSessionUpdateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session_update_request%20%3E%20(schema)) { audio } Translation session fields to update. The session `type` and `model` are set\nat creation and cannot be changed with `session.update`.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512\n\nRealtimeTranslationSessionUpdateRequest object { audio } Realtime translation session fields that can be updated with `session.update`.audio: optional object { input, output } Configuration for translation input and output audio.input: optional object { noise_reduction, transcription } noise_reduction: optional object { type } or nullOptional input noise reduction. Set to `null` to disable it.type: [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { model } or nullOptional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.model: stringThe transcription model to use for source transcript deltas.output: optional object { language } language: optional stringTarget language for translated output audio and transcript deltas.\n\nRealtimeTranslationSessionUpdatedEvent object { event_id, session, type } Returned when a translation session is updated with a `session.update` event,\nunless there is an error.event_id: stringThe unique ID of the server event.session: [RealtimeTranslationSession](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_translation_session%20%3E%20(schema)) { id, audio, expires_at, 2 more } The translation session configuration.type: \"session.updated\"The event type, must be `session.updated`.\n\nRealtimeTruncation = \"auto\" or \"disabled\" or object { retention_ratio, type, token_limits } When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\nResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated audio is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringBase64-encoded audio data delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.delta\"The event type, must be `response.output_audio.delta`.\n\nResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more } Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio.done\"The event type, must be `response.output_audio.done`.\n\nResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the model-generated transcription of audio output is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe transcript delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_audio_transcript.delta\"The event type, must be `response.output_audio_transcript.delta`.\n\nResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.transcript: stringThe final transcript of the audio.type: \"response.output_audio_transcript.done\"The event type, must be `response.output_audio_transcript.done`.\n\nResponseCancelEvent object { type, event_id, response_id } Send this event to cancel an in-progress response. The server will respond\nwith a `response.done` event with a status of `response.status=cancelled`. If\nthere is no response to cancel, the server will respond with an error. It’s safe\nto call `response.cancel` even if no response is in progress, an error will be\nreturned the session will remain unaffected.type: \"response.cancel\"The event type, must be `response.cancel`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response_id: optional stringA specific response ID to cancel - if not provided, will cancel an\nin-progress response in the default conversation.\n\nResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more } Returned when a new content part is added to an assistant message item during\nresponse generation.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item to which the content part was added.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that was added.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.added\"The event type, must be `response.content_part.added`.\n\nResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more } Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.part: object { audio, text, transcript, type } The content part that is done.audio: optional stringBase64-encoded audio data (if type is “audio”).text: optional stringThe text content (if type is “text”).transcript: optional stringThe transcript of the audio (if type is “audio”).type: optional \"audio\" or \"text\"The content type (“text”, “audio”).One of the following:\"audio\"\"text\"response_id: stringThe ID of the response.type: \"response.content_part.done\"The event type, must be `response.content_part.done`.\n\nResponseCreateEvent object { type, event_id, response } This event instructs the server to create a Response, which means triggering\nmodel inference. When in Server VAD mode, the server will create Responses\nautomatically. A Response will include at least one Item, and may have two, in which case\nthe second will be a function call. These Items will be appended to the\nconversation history by default. The server will respond with a `response.created` event, events for Items\nand content created, and finally a `response.done` event to indicate the\nResponse is complete. The `response.create` event includes inference configuration like\n`instructions` and `tools`. If these are set, they will override the Session’s\nconfiguration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can\nhave arbitrary input, and it’s possible to disable writing the output to the Conversation.\nOnly one Response can write to the default Conversation at a time, but otherwise multiple\nResponses can be created in parallel. The `metadata` field is a good way to disambiguate\nmultiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default\nConversation. Arbitrary input can be provided with the `input` field, which is an array accepting\nraw Items and references to existing Items.type: \"response.create\"The event type, must be `response.create`.event_id: optional stringOptional client-generated ID used to identify this event.maxLength512response: optional [RealtimeResponseCreateParams](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response_create_params%20%3E%20(schema)) { audio, conversation, input, 9 more } Create a new Realtime response with these parameters\n\nResponseCreatedEvent object { event_id, response, type } Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.created\"The event type, must be `response.created`.\n\nResponseDoneEvent object { event_id, response, type } Returned when a Response is done streaming. Always emitted, no matter the\nfinal state. The Response object included in the `response.done` event will\ninclude all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful\n(`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding\nany audio content.event_id: stringThe unique ID of the server event.response: [RealtimeResponse](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_response%20%3E%20(schema)) { id, audio, conversation_id, 8 more } The response resource.type: \"response.done\"The event type, must be `response.done`.\n\nResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more } Returned when the model-generated function call arguments are updated.call_id: stringThe ID of the function call.delta: stringThe arguments delta as a JSON string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.delta\"The event type, must be `response.function_call_arguments.delta`.\n\nResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more } Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.arguments: stringThe final arguments as a JSON string.call_id: stringThe ID of the function call.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the function call item.name: stringThe name of the function that was called.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.function_call_arguments.done\"The event type, must be `response.function_call_arguments.done`.\n\nResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more } Returned when MCP tool call arguments are updated during response generation.delta: stringThe JSON-encoded arguments delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.delta\"The event type, must be `response.mcp_call_arguments.delta`.obfuscation: optional string or nullIf present, indicates the delta text was obfuscated.\n\nResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more } Returned when MCP tool call arguments are finalized during response generation.arguments: stringThe final JSON-encoded arguments string.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.mcp_call_arguments.done\"The event type, must be `response.mcp_call_arguments.done`.\n\nResponseMcpCallCompleted object { event_id, item_id, output_index, type } Returned when an MCP tool call has completed successfully.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.completed\"The event type, must be `response.mcp_call.completed`.\n\nResponseMcpCallFailed object { event_id, item_id, output_index, type } Returned when an MCP tool call has failed.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.failed\"The event type, must be `response.mcp_call.failed`.\n\nResponseMcpCallInProgress object { event_id, item_id, output_index, type } Returned when an MCP tool call has started and is in progress.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the MCP tool call item.output_index: numberThe index of the output item in the response.type: \"response.mcp_call.in_progress\"The event type, must be `response.mcp_call.in_progress`.\n\nResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more } Returned when a new Item is created during Response generation.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.added\"The event type, must be `response.output_item.added`.\n\nResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more } Returned when an Item is done streaming. Also emitted when a Response is\ninterrupted, incomplete, or cancelled.event_id: stringThe unique ID of the server event.item: [ConversationItem](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20conversation_item%20%3E%20(schema))A single item within a Realtime conversation.output_index: numberThe index of the output item in the Response.response_id: stringThe ID of the Response to which the item belongs.type: \"response.output_item.done\"The event type, must be `response.output_item.done`.\n\nResponseTextDeltaEvent object { content_index, delta, event_id, 4 more } Returned when the text value of an “output_text” content part is updated.content_index: numberThe index of the content part in the item’s content array.delta: stringThe text delta.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.type: \"response.output_text.delta\"The event type, must be `response.output_text.delta`.\n\nResponseTextDoneEvent object { content_index, event_id, item_id, 4 more } Returned when the text value of an “output_text” content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.content_index: numberThe index of the content part in the item’s content array.event_id: stringThe unique ID of the server event.item_id: stringThe ID of the item.output_index: numberThe index of the output item in the response.response_id: stringThe ID of the response.text: stringThe final text content.type: \"response.output_text.done\"The event type, must be `response.output_text.done`.\n\nSessionCreatedEvent object { event_id, session, type } Returned when a Session is created. Emitted automatically when a new\nconnection is established as the first server event. This event will contain\nthe default Session configuration.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.created\"The event type, must be `session.created`.\n\nSessionUpdateEvent object { session, type, event_id } Send this event to update the session’s configuration.\nThe client may send this event at any time to update any field\nexcept for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond\nwith a `session.updated` event showing the full, effective configuration.\nOnly the fields that are present in the `session.update` are updated. To clear a field like\n`instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.\nTo clear a field like `turn_detection`, pass `null`.session: [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Update the Realtime session. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.type: \"session.update\"The event type, must be `session.update`.event_id: optional stringOptional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.maxLength512\n\nSessionUpdatedEvent object { event_id, session, type } Returned when a session is updated with a `session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. type: \"session.updated\"The event type, must be `session.updated`.\n\nTranscriptionSessionUpdate object { session, type, event_id } Send this event to update a transcription session.session: object { include, input_audio_format, input_audio_noise_reduction, 2 more } Realtime transcription session object configuration.include: optional array of \"item.input_audio_transcription.logprobs\"The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`input_audio_format: optional \"pcm16\" or \"g711_ulaw\" or \"g711_alaw\"The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.One of the following:\"pcm16\"\"g711_ulaw\"\"g711_alaw\"input_audio_noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.input_audio_transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional \"server_vad\"Type of turn detection. Only `server_vad` is currently supported for transcription sessions.type: \"transcription_session.update\"The event type, must be `transcription_session.update`.event_id: optional stringOptional client-generated ID used to identify this event.\n\nTranscriptionSessionUpdatedEvent object { event_id, session, type } Returned when a transcription session is updated with a `transcription_session.update` event, unless\nthere is an error.event_id: stringThe unique ID of the server event.session: object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.type: \"transcription_session.updated\"The event type, must be `transcription_session.updated`.\n\n##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nSessionCreateResponse object { id, audio, expires_at, 10 more } A Realtime session configuration object.id: optional stringUnique identifier for the session that looks like `sess_1234567890abcdef`.audio: optional object { input, output } Configuration for input and output audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection.prefix_padding_ms: optional numbersilence_duration_ms: optional numberthreshold: optional numbertype: optional stringType of turn detection, only `server_vad` is currently supported.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.speed: optional numbervoice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. instructions: optional stringThe default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. “be extremely succinct”, “act friendly”, “here are examples of good\nresponses”) and on audio behavior (e.g. “talk quickly”, “inject emotion\ninto your voice”, “laugh frequently”). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior. Note that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional stringThe Realtime model used for this session.object: optional stringThe object type. Always `realtime.session`.output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"tool_choice: optional stringHow the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } Tools (functions) available to the model.description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:\"auto\"Default tracing mode for the session.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.\n\n##### ModelsExpand Collapse\n\nTranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more } A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.client_secret: object { expires_at, value } Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.expires_at: numberTimestamp for when the token expires. Currently, all tokens expire\nafter one minute.formatunixtimevalue: stringEphemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.input_audio_format: optional stringThe format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.input_audio_transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. To disable audio,\nset this to [“text”].One of the following:\"text\"\"audio\"turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 379164, "slov": 48770, "odkazu": 1802, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "https://developers.openai.com/api/docs/api-reference/realtime", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 10:43:14", "sha256": "0a5eefef6fd7a40c55fb62ec442f908419c68c10757df6b26c92eedf29eb18fb", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://platform.openai.com/logs?api=traces", "https://modelcontextprotocol.io/specification/2025-06-18/schema"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-sessions", "titulek": "Client Secrets | OpenAI API Reference", "h1": "Client Secrets", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/subresources/client_secrets/", "jazyk": "en", "robots_meta": "noindex, follow", "og": {"og:title": "Client Secrets", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/subresources/client_secrets/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Realtime"], "osnova": [{"uroven": 5, "text": "ModelsExpand Collapse"}], "markdown": "##### ModelsExpand Collapse\n\nClientSecretCreateResponse object { expires_at, session, value } Response from creating a session and client secret for the Realtime API.expires_at: numberExpiration timestamp for the client secret, in seconds since epoch.formatunixtimesession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional or Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.: optional One of the following:interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.: optional : optional McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:stringOne of the following:prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. value: stringThe generated client secret value.\n\nRealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.\n\nRealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nRealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type } Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.", "znaku_textu": 47930, "slov": 6316, "odkazu": 577, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:36:11", "sha256": "6fddce05b240deaabefcec2e2e6fd115a269e8ad23fcdcc33d8e30267e41421e", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://modelcontextprotocol.io/specification/2025-06-18/schema", "https://platform.openai.com/logs?api=traces"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime-sessions/create-realtime-client-secret", "titulek": "Create client secret | OpenAI API Reference", "h1": "Create client secret", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/subresources/client_secrets/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create client secret", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/subresources/client_secrets/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Realtime", "Client Secrets"], "osnova": [{"uroven": 5, "text": "Body ParametersJSONExpand Collapse"}, {"uroven": 5, "text": "ReturnsExpand Collapse"}, {"uroven": 3, "text": "Create client secret"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Create a Realtime client secret with an associated session configuration.\n\nClient secrets are short-lived tokens that can be passed to a client app,\nsuch as a web frontend or mobile client, which grants access to the Realtime API without\nleaking your main API key. You can configure a custom TTL for each client secret.\n\nYou can also attach session configuration options to the client secret, which will be\napplied to any sessions created using that client secret, but these can also be overridden\nby the client connection.\n\n[Learn more about authentication with client secrets over WebRTC](/api/docs/guides/realtime-webrtc).\n\nReturns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`.\n\n##### Body ParametersJSONExpand Collapse\n\nexpires_after: optional object { anchor, seconds } Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.anchor: optional \"created_at\"The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.seconds: optional numberThe number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.formatint64minimum10maximum7200\n\nsession: optional [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } or [RealtimeTranscriptionSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_create_request%20%3E%20(schema)) { type, audio, include } Session configuration to use for the client secret. Choose either a realtime\nsession or a transcription session.One of the following:RealtimeSessionCreateRequest object { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).id: stringThe unique identifier of the prompt template to use.variables: optional map[string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image%20%3E%20(schema)) { detail, type, file_id, 2 more } or [ResponseInputFile](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file%20%3E%20(schema)) { type, detail, file_data, 4 more } ] or nullOptional 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.One of the following:stringResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImage object { detail, type, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).detail: [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema))The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"type: \"input_image\"The type of the input item. Always `input_image`.file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.formaturiprompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFile object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional stringThe content of the file to be sent to the model.file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional stringThe URL of the file to be sent to the model.formaturifilename: optional stringThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.version: optional string or nullOptional version of the prompt template.reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0RealtimeTranscriptionSessionCreateRequest object { type, audio, include } Realtime transcription session object configuration.type: \"transcription\"The type of session to create. Always `transcription` for transcription sessions.audio: optional [RealtimeTranscriptionSessionAudio](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio%20%3E%20(schema)) { input } Configuration for input and output audio.input: optional [RealtimeTranscriptionSessionAudioInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.turn_detection: optional [RealtimeTranscriptionSessionAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_transcription_session_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\n##### ReturnsExpand Collapse\n\nexpires_at : number\n\nExpiration timestamp for the client secret, in seconds since epoch.\n\nformat unixtime\n\nsession: [RealtimeSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_session_create_response%20%3E%20(schema)) { id, object, type, 13 more } or [RealtimeTranscriptionSessionCreateResponse](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_create_response%20%3E%20(schema)) { id, object, type, 3 more } The session configuration for either a realtime or transcription session.One of the following:RealtimeSessionCreateResponse object { id, object, type, 13 more } A Realtime session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: \"realtime.session\"The object type. Always `realtime.session`.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional object { input, output } Configuration for input and output audio.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"transcription: optional object { language, languages, model, prompt } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more } or object { type, create_response, eagerness, interrupt_response } or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional object { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreThe voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.One of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).id: stringThe unique identifier of the prompt template to use.variables: optional map[string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image%20%3E%20(schema)) { detail, type, file_id, 2 more } or [ResponseInputFile](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file%20%3E%20(schema)) { type, detail, file_data, 4 more } ] or nullOptional 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.One of the following:stringResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImage object { detail, type, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).detail: [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema))The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"type: \"input_image\"The type of the input item. Always `input_image`.file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.formaturiprompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFile object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional stringThe content of the file to be sent to the model.file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional stringThe URL of the file to be sent to the model.formaturifilename: optional stringThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.version: optional string or nullOptional version of the prompt template.reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"tool_choice: optional [ToolChoiceOptions](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_options%20%3E%20(schema)) or [ToolChoiceFunction](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_function%20%3E%20(schema)) { name, type } or [ToolChoiceMcp](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20tool_choice_mcp%20%3E%20(schema)) { server_label, type, name } How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional array of [RealtimeFunctionTool](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_function_tool%20%3E%20(schema)) { description, name, parameters, type } or object { server_label, type, allowed_callers, 9 more } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional \"auto\" or object { group_id, metadata, workflow_name } or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more } A Realtime transcription session configuration object.id: stringUnique identifier for the session that looks like `sess_1234567890abcdef`.object: stringThe object type. Always `realtime.transcription_session`.type: \"transcription\"The type of session. Always `transcription` for transcription sessions.audio: optional object { input } Configuration for input audio for the session.input: optional object { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The PCM audio format. Only a 24kHz sample rate is supported.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 ÎĽ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.noise_reduction: optional object { type } Configuration for input audio noise reduction.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"transcription: optional object { language, languages, model, prompt } Configuration of the transcription model.language: optional stringThe language of the input audio.languages: optional array of stringThe possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringThe prompt configured for input audio transcription, when present.turn_detection: optional [RealtimeTranscriptionSessionTurnDetection](/api/reference/resources/realtime#(resource)%20realtime.client_secrets%20%3E%20(model)%20realtime_transcription_session_turn_detection%20%3E%20(schema)) { prefix_padding_ms, silence_duration_ms, threshold, type } or nullConfiguration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.prefix_padding_ms: optional numberAmount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberDuration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.type: optional stringType of turn detection, only `server_vad` is currently supported.expires_at: optional numberExpiration timestamp for the session, in seconds since epoch.formatunixtimeinclude: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n\nvalue : string\n\nThe generated client secret value.\n\n### Create client secret\n\n```\ncurl -X POST https://api.openai.com/v1/realtime/client_secrets \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"expires_after\": { \"anchor\": \"created_at\", \"seconds\": 600 }, \"session\": { \"type\": \"realtime\", \"model\": \"gpt-realtime\", \"instructions\": \"You are a friendly assistant.\" } }' \n```\n\n```\n{ \"value\": \"ek_68af296e8e408191a1120ab6383263c2\", \"expires_at\": 1756310470, \"session\": { \"type\": \"realtime\", \"object\": \"realtime.session\", \"id\": \"sess_C9CiUVUzUzYIssh3ELY1d\", \"model\": \"gpt-realtime\", \"output_modalities\": [ \"audio\" ], \"instructions\": \"You are a friendly assistant.\", \"tools\": [], \"tool_choice\": \"auto\", \"max_output_tokens\": \"inf\", \"tracing\": null, \"truncation\": \"auto\", \"prompt\": null, \"expires_at\": 0, \"audio\": { \"input\": { \"format\": { \"type\": \"audio/pcm\", \"rate\": 24000 }, \"transcription\": null, \"noise_reduction\": null, \"turn_detection\": { \"type\": \"server_vad\", } }, \"output\": { \"format\": { \"type\": \"audio/pcm\", \"rate\": 24000 }, \"voice\": \"alloy\", \"speed\": 1.0 } }, \"include\": null } } \n```\n\n##### Returns Examples\n\n```\n{ \"value\": \"ek_68af296e8e408191a1120ab6383263c2\", \"expires_at\": 1756310470, \"session\": { \"type\": \"realtime\", \"object\": \"realtime.session\", \"id\": \"sess_C9CiUVUzUzYIssh3ELY1d\", \"model\": \"gpt-realtime\", \"output_modalities\": [ \"audio\" ], \"instructions\": \"You are a friendly assistant.\", \"tools\": [], \"tool_choice\": \"auto\", \"max_output_tokens\": \"inf\", \"tracing\": null, \"truncation\": \"auto\", \"prompt\": null, \"expires_at\": 0, \"audio\": { \"input\": { \"format\": { \"type\": \"audio/pcm\", \"rate\": 24000 }, \"transcription\": null, \"noise_reduction\": null, \"turn_detection\": { \"type\": \"server_vad\", } }, \"output\": { \"format\": { \"type\": \"audio/pcm\", \"rate\": 24000 }, \"voice\": \"alloy\", \"speed\": 1.0 } }, \"include\": null } } \n```", "znaku_textu": 74551, "slov": 9808, "odkazu": 942, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 12:36:15", "sha256": "576d9ce1d7be243cba5bcb2f6d3451e21be88f10d94a4c4a06195a16214582c3", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://learn.chatgpt.com/docs", "https://learn.chatgpt.com/use-cases", "https://platform.openai.com/login", "https://chatgpt.com/", "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes", "https://modelcontextprotocol.io/specification/2025-06-18/schema", "https://platform.openai.com/logs?api=traces"]} {"url": "https://developers.openai.com/api/docs/api-reference/realtime/create-call", "titulek": "Create call | OpenAI API Reference", "h1": "Create call", "popis": "", "klicova_slova": "", "kanonicka": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/create/", "jazyk": "en", "robots_meta": "", "og": {"og:title": "Create call", "og:type": "article", "og:url": "https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/create/", "og:locale": "en", "og:site_name": "OpenAI API Reference"}, "jsonld": [], "drobecky": ["API Reference", "Realtime", "Calls"], "osnova": [{"uroven": 5, "text": "Body ParametersForm DataExpand Collapse"}, {"uroven": 3, "text": "Create call"}, {"uroven": 5, "text": "Returns Examples"}], "markdown": "Create a new Realtime API call over WebRTC and receive the SDP answer needed\nto complete the peer connection.\n\n##### Body ParametersForm DataExpand Collapse\n\nsdp : string\n\nWebRTC Session Description Protocol (SDP) offer generated by the caller.\n\nsession: optional [RealtimeSessionCreateRequest](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_session_create_request%20%3E%20(schema)) { type, audio, include, 11 more } Realtime session object configuration.type: \"realtime\"The type of session to create. Always `realtime` for the Realtime API.audio: optional [RealtimeAudioConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config%20%3E%20(schema)) { input, output } Configuration for input and output audio.input: optional [RealtimeAudioConfigInput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_input%20%3E%20(schema)) { format, noise_reduction, transcription, turn_detection } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the input audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.noise_reduction: optional object { type } Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.type: optional [NoiseReductionType](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20noise_reduction_type%20%3E%20(schema))Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.One of the following:\"near_field\"\"far_field\"transcription: optional [AudioTranscription](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20audio_transcription%20%3E%20(schema)) { delay, keywords, language, 3 more } Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.delay: optional \"minimal\" or \"low\" or \"medium\" or 2 moreControls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"keywords: optional array of stringWords or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.language: optional stringThe language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.languages: optional array of stringPossible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.model: optional string or \"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:string\"whisper-1\" or \"gpt-transcribe\" or \"gpt-live-transcribe\" or 5 moreThe model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.One of the following:\"whisper-1\"\"gpt-transcribe\"\"gpt-live-transcribe\"\"gpt-4o-mini-transcribe\"\"gpt-4o-mini-transcribe-2025-12-15\"\"gpt-4o-transcribe\"\"gpt-4o-transcribe-diarize\"\"gpt-realtime-whisper\"prompt: optional stringAn optional text to guide the model’s style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example “expect words related to technology”.\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.turn_detection: optional [RealtimeAudioInputTurnDetection](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_input_turn_detection%20%3E%20(schema)) or nullConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. For `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.One of the following:ServerVad object { type, create_response, idle_timeout_ms, 4 more } Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.type: \"server_vad\"Type of turn detection, `server_vad` to turn on simple Server VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.idle_timeout_ms: optional number or nullOptional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context. The timeout value will be applied after the last model response’s audio has finished playing,\ni.e. it’s set to the `response.done` time plus audio playback duration. An `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.minimum5000maximum30000interrupt_response: optional booleanWhether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete. If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.prefix_padding_ms: optional numberUsed only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.silence_duration_ms: optional numberUsed only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.threshold: optional numberUsed only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.SemanticVad object { type, create_response, eagerness, interrupt_response } Server-side semantic turn detection which uses a model to determine when the user has finished speaking.type: \"semantic_vad\"Type of turn detection, `semantic_vad` to turn on Semantic VAD.create_response: optional booleanWhether or not to automatically generate a response when a VAD stop event occurs.eagerness: optional \"low\" or \"medium\" or \"high\" or \"auto\"Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.One of the following:\"low\"\"medium\"\"high\"\"auto\"interrupt_response: optional booleanWhether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.output: optional [RealtimeAudioConfigOutput](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_config_output%20%3E%20(schema)) { format, speed, voice } format: optional [RealtimeAudioFormats](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_audio_formats%20%3E%20(schema))The format of the output audio.One of the following:PCMAudio object { rate, type } The PCM audio format. Only a 24kHz sample rate is supported.rate: optional 24000The sample rate of the audio. Always `24000`.type: optional \"audio/pcm\"The audio format. Always `audio/pcm`.PCMUAudio object { type } The G.711 μ-law format.type: optional \"audio/pcmu\"The audio format. Always `audio/pcmu`.PCMAAudio object { type } The G.711 A-law format.type: optional \"audio/pcma\"The audio format. Always `audio/pcma`.speed: optional numberThe speed of the model’s spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress. This parameter is a post-processing adjustment to the audio after it is generated, it’s\nalso possible to prompt the model to speak faster or slower.minimum0.25maximum1.5voice: optional string or \"alloy\" or \"ash\" or \"ballad\" or 7 more or object { id } The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nWe recommend `marin` and `cedar` for best quality.One of the following:string\"alloy\" or \"ash\" or \"ballad\" or 7 moreOne of the following:\"alloy\"\"ash\"\"ballad\"\"coral\"\"echo\"\"sage\"\"shimmer\"\"verse\"\"marin\"\"cedar\"ID object { id } Custom voice reference.id: stringThe custom voice ID, e.g. `voice_1234`.include: optional array of \"item.input_audio_transcription.logprobs\"Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.instructions: optional stringThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.max_output_tokens: optional number or \"inf\"Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.One of the following:number\"inf\"model: optional string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:string\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 moreThe Realtime model used for this session.One of the following:\"gpt-realtime\"\"gpt-realtime-1.5\"\"gpt-realtime-2\"\"gpt-realtime-2.1\"\"gpt-realtime-2.1-mini\"\"gpt-realtime-2025-08-28\"\"gpt-4o-realtime-preview\"\"gpt-4o-realtime-preview-2024-10-01\"\"gpt-4o-realtime-preview-2024-12-17\"\"gpt-4o-realtime-preview-2025-06-03\"\"gpt-4o-mini-realtime-preview\"\"gpt-4o-mini-realtime-preview-2024-12-17\"\"gpt-realtime-mini\"\"gpt-realtime-mini-2025-10-06\"\"gpt-realtime-mini-2025-12-15\"\"gpt-audio-1.5\"\"gpt-audio-mini\"\"gpt-audio-mini-2025-10-06\"\"gpt-audio-mini-2025-12-15\"output_modalities: optional array of \"text\" or \"audio\"The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.One of the following:\"text\"\"audio\"parallel_tool_calls: optional booleanWhether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.prompt: optional [ResponsePrompt](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_prompt%20%3E%20(schema)) { id, variables, version } or nullReference to a prompt template and its variables.\n[Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).id: stringThe unique identifier of the prompt template to use.variables: optional map[string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } or [ResponseInputImage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_image%20%3E%20(schema)) { detail, type, file_id, 2 more } or [ResponseInputFile](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_file%20%3E%20(schema)) { type, detail, file_data, 4 more } ] or nullOptional 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.One of the following:stringResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: \"input_text\"The type of the input item. Always `input_text`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputImage object { detail, type, file_id, 2 more } An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).detail: [ImageDetail](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20image_detail%20%3E%20(schema))The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.One of the following:\"low\"\"high\"\"auto\"\"original\"type: \"input_image\"The type of the input item. Always `input_image`.file_id: optional string or nullThe ID of the file to be sent to the model.image_url: optional string or nullThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.formaturiprompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.ResponseInputFile object { type, detail, file_data, 4 more } A file input to the model.type: \"input_file\"The type of the input item. Always `input_file`.detail: optional \"auto\" or \"low\" or \"high\"The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.One of the following:\"auto\"\"low\"\"high\"file_data: optional stringThe content of the file to be sent to the model.file_id: optional string or nullThe ID of the file to be sent to the model.file_url: optional stringThe URL of the file to be sent to the model.formaturifilename: optional stringThe name of the file to be sent to the model.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: \"explicit\"The breakpoint mode. Always `explicit`.version: optional string or nullOptional version of the prompt template.reasoning: optional [RealtimeReasoning](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning%20%3E%20(schema)) { effort } Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.effort: optional [RealtimeReasoningEffort](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_reasoning_effort%20%3E%20(schema))Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.One of the following:\"minimal\"\"low\"\"medium\"\"high\"\"xhigh\"tool_choice: optional [RealtimeToolChoiceConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tool_choice_config%20%3E%20(schema))How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.One of the following:ToolChoiceOptions = \"none\" or \"auto\" or \"required\"Controls which (if any) tool is called by the model. `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\nmore tools. `required` means the model must call one or more tools.One of the following:\"none\"\"auto\"\"required\"ToolChoiceFunction object { name, type } Use this option to force the model to call a specific function.name: stringThe name of the function to call.type: \"function\"For function calling, the type is always `function`.ToolChoiceMcp object { server_label, type, name } Use this option to force the model to call a specific tool on a remote MCP server.server_label: stringThe label of the MCP server to use.type: \"mcp\"For MCP tools, the type is always `mcp`.name: optional string or nullThe name of the tool to call on the server.tools: optional [RealtimeToolsConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tools_config%20%3E%20(schema)) { , McpTool } Tools available to the model.One of the following:RealtimeFunctionTool object { description, name, parameters, type } description: optional stringThe description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).name: optional stringThe name of the function.parameters: optional unknownParameters of the function in JSON Schema.type: optional \"function\"The type of the tool, i.e. `function`.McpTool object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).server_label: stringA label for this MCP server, used to identify it in tool calls.type: \"mcp\"The type of the MCP tool. Always `mcp`.allowed_callers: optional array of \"direct\" or \"programmatic\" or nullThe tool invocation context(s).One of the following:\"direct\"\"programmatic\"allowed_tools: optional array of string or object { read_only, tool_names } or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.connector_id: optional \"connector_dropbox\" or \"connector_gmail\" or \"connector_googlecalendar\" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: Dropbox: `connector_dropbox` Gmail: `connector_gmail` Google Calendar: `connector_googlecalendar` Google Drive: `connector_googledrive` Microsoft Teams: `connector_microsoftteams` Outlook Calendar: `connector_outlookcalendar` Outlook Email: `connector_outlookemail` SharePoint: `connector_sharepoint` One of the following:\"connector_dropbox\"\"connector_gmail\"\"connector_googlecalendar\"\"connector_googledrive\"\"connector_microsoftteams\"\"connector_outlookcalendar\"\"connector_outlookemail\"\"connector_sharepoint\"defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.headers: optional map[string] or nullOptional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.require_approval: optional object { always, never } or \"always\" or \"never\" or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter object { always, never } Specify which of the MCP server’s tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.always: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.never: optional object { read_only, tool_names } A filter object to specify which tools are allowed.read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.tool_names: optional array of stringList of allowed tool names.McpToolApprovalSetting = \"always\" or \"never\"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.One of the following:\"always\"\"never\"server_description: optional stringOptional description of the MCP server, used to provide more context.server_url: optional stringThe URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.tracing: optional [RealtimeTracingConfig](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_tracing_config%20%3E%20(schema)) or nullRealtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.One of the following:Auto = \"auto\"Enables tracing and sets default values for tracing configuration options. Always `auto`.TracingConfiguration object { group_id, metadata, workflow_name } Granular configuration for tracing.group_id: optional stringThe group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.metadata: optional unknownThe arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.workflow_name: optional stringThe name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.truncation: optional [RealtimeTruncation](/api/reference/resources/realtime#(resource)%20realtime%20%3E%20(model)%20realtime_truncation%20%3E%20(schema))When the number of tokens in a conversation exceeds the model’s input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model’s context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model’s input token limit.One of the following:\"auto\" or \"disabled\"The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.One of the following:\"auto\"\"disabled\"RetentionRatioTruncation object { retention_ratio, type, token_limits } Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.retention_ratio: numberFraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.minimum0maximum1type: \"retention_ratio\"Use retention ratio truncation.token_limits: optional object { post_instructions } Optional custom token limits for this truncation strategy. If not provided, the model’s default token limits will be used.post_instructions: optional numberMaximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model’s context window size minus the maximum output tokens.minimum0\n\n### Create call\n\n```\ncurl -X POST https://api.openai.com/v1/realtime/calls \\ -H \"Authorization: Bearer $OPENAI_API_KEY\" \\ -F \"sdp=